#4525: Type synonyms not expanded consistently in errors
----------------------------------------+-----------------------------------
    Reporter:  igloo                    |        Owner:              
        Type:  bug                      |       Status:  new         
    Priority:  normal                   |    Milestone:  7.2.1       
   Component:  Compiler (Type checker)  |      Version:  7.1         
    Keywords:                           |     Testcase:              
   Blockedby:                           |   Difficulty:              
          Os:  Unknown/Multiple         |     Blocking:              
Architecture:  Unknown/Multiple         |      Failure:  None/Unknown
----------------------------------------+-----------------------------------

Comment(by simonpj):

 Actually this is deliberate. The "couldn't match" part describes the
 actual incompatibility encountered.  The "actual/expected" part describes
 the original types being unified.   A more typical case might be
 {{{
     Couldn't match expected type `Char' with actual type `Int'
     Expected type: Char -> a
       Actual type: Int -> a
 }}}
 It would be possible to make the first, "couldn't match", bit speak in
 terms of any immediate type synonym.  That would make your original error
 look ok, and also:
 {{{
     Couldn't match expected type `Char' with actual type `Foo'
     Expected type: Char -> a
       Actual type: Foo -> a
 }}}
 Would that be better? Anyone?

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4525#comment:1>
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