#1221: Types don't match expressions in type error
-------------------------------------+--------------------------------------
 Reporter:  igloo                    |          Owner:         
     Type:  bug                      |         Status:  new    
 Priority:  normal                   |      Milestone:  6.6.2  
Component:  Compiler (Type checker)  |        Version:  6.6    
 Severity:  normal                   |     Resolution:         
 Keywords:                           |     Difficulty:  Unknown
 Testcase:                           |   Architecture:  Unknown
       Os:  Unknown                  |  
-------------------------------------+--------------------------------------
Comment (by simonpj):

 Frederick adds: Also, I don't know what other people will think, but
 something bothers me about the "In" on the third line - perhaps if we
 replaced, on just
 that line, "In" with "For":
 {{{
 >     Couldn't match expected type `Bool -> [a]'
 >            against inferred type `()'
 >     For the first argument of `a', namely `()'
 >     In the expression: a ()
 >     In the definition of `d': d = a ()
 }}}
 then it would help reinforce the idea that the given expression E :=
 `()' is the referent of the words "expected" and "inferred" - i.e.
 that the first type is "expected" *of* E by the context, and the
 second type is "inferred" *for* E from other judgments. Does that make
 sense?

 Otherwise, since from different perspectives both types are both
 expected and inferred, I think there is potential for confusion (the
 other perspective is, respecting the context).

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