cvs commit: fptools/ghc/compiler/typecheck TcBinds.lhs TcSimplify.lhs
fptools/ghc/compiler/types Class.lhs FunDeps.lhs Type.lhs
Simon Peyton Jones
simonpj@glass.cse.ogi.edu
Thu, 3 May 2001 02:32:49 -0700
simonpj 2001/05/03 02:32:49 PDT
Modified files:
ghc/compiler/typecheck TcBinds.lhs TcSimplify.lhs
ghc/compiler/types Class.lhs FunDeps.lhs Type.lhs
Log:
------------------------------------------------
Dramatically improve the error messages arising
from failed unifications triggered by 'improvement'
------------------------------------------------
A bit more plumbing in FunDeps, and consequential wibbles elsewhere
Changes this:
Couldn't match `Int' against `[(String, Int)]'
Expected type: Int
Inferred type: [(String, Int)]
to this:
Foo.hs:8:
Couldn't match `Int' against `[(String, Int)]'
Expected type: Int
Inferred type: [(String, Int)]
When using functional dependencies to combine
?env :: Int, arising from a type signature at Foo.hs:7
?env :: [(String, Int)],
arising from use of implicit parameter `?env' at Foo.hs:8
When generalising the types for ident
Revision Changes Path
1.89 +9 -4 fptools/ghc/compiler/typecheck/TcBinds.lhs
1.75 +15 -6 fptools/ghc/compiler/typecheck/TcSimplify.lhs
1.35 +5 -1 fptools/ghc/compiler/types/Class.lhs
1.14 +34 -23 fptools/ghc/compiler/types/FunDeps.lhs
1.83 +8 -2 fptools/ghc/compiler/types/Type.lhs