[GHC] #8392: Suggest AllowAmbiguousTypes

GHC ghc-devs
Tue Oct 1 14:54:25 UTC 2013


#8392: Suggest AllowAmbiguousTypes
-------------------------------------------+-------------------------------
       Reporter:  rwbarton                 |             Owner:
           Type:  feature request          |            Status:  new
       Priority:  normal                   |         Milestone:
      Component:  Compiler (Type checker)  |           Version:  7.7
       Keywords:                           |  Operating System:
   Architecture:  Unknown/Multiple         |  Unknown/Multiple
     Difficulty:  Unknown                  |   Type of failure:
     Blocked By:                           |  None/Unknown
Related Tickets:                           |         Test Case:
                                           |          Blocking:
-------------------------------------------+-------------------------------
 The error message I get with GHC HEAD on the example program in #8390:
 {{{
 tf.hs:38:10:
     Could not deduce (Fun g a b0)
       arising from the ambiguity check for an instance declaration
     from the context (Fun f b c, Fun g a b)
       bound by an instance declaration:
                  (Fun f b c, Fun g a b) => Fun (Compose f g) a c
       at tf.hs:38:10-56
     The type variable ?b0? is ambiguous
     In the ambiguity check for:
       forall f g a c b. (Fun f b c, Fun g a b) => Fun (Compose f g) a c
     In the instance declaration for ?Fun (Compose f g) a c?
 }}}
 could perhaps benefit from an appended line:
 {{{
     (To defer this ambiguity check to use sites, enable
 AllowAmbiguousTypes)
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8392>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list