
#15077: Suggest NoMonomorphismRestriction or type signature -------------------------------------+------------------------------------- Reporter: tomjaguarpaw | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The following program results in a compile error. To fix the error one can either give an explicit signature or turn on `NoMonomorphismRestriction`. Could the compile error please mention both of these options (and provide the exact type signature required)? {{{ type family G a b data D a = D (G a ()) d = D () }}} {{{ • Couldn't match expected type ‘G a0 ()’ with actual type ‘()’ The type variable ‘a0’ is ambiguous • In the first argument of ‘D’, namely ‘()’ In the expression: D () In an equation for ‘d’: d = D () • Relevant bindings include d :: D a0 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15077 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler