#5858: type inference of  an OverloadedString for a class instance with type
parameters
---------------------------------+------------------------------------------
    Reporter:  GregWeber         |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  normal            |   Milestone:                  
   Component:  Compiler          |     Version:  7.4.1           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by simonpj):

 How's this?  Instead of the old message
 {{{
 T5858.hs:11:7:
     No instance for (InferOverloaded ([a0], [a1]))
       arising from a use of `infer'
     The type variables `a0', `a1' are ambiguous
     Possible fix: add a type signature that fixes these type variable(s)
     Possible fix:
       add an instance declaration for (InferOverloaded ([a0], [a1]))
     In the expression: infer ([], [])
     In an equation for `foo': foo = infer ([], [])
 }}}
 we now get this:
 {{{
 T5858.hs:11:7:
     Cannot resolve the instance for InferOverloaded ([a0], [a1])
       arising from a use of `infer'
     There is a potential instance available:
       instance t1 ~ String => InferOverloaded (t1, t1)
         -- Defined at T5858.hs:8:10
     Possible fix: add a type signature to instantiate `a0, a1'
     In the expression: infer ([], [])
     In an equation for `foo': foo = infer ([], [])
 }}}
 Is that better?

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5858#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to