cvs commit: fptools/ghc/compiler NOTES fptools/ghc/compiler/deSugar
DsBinds.lhs DsExpr.lhs DsGRHSs.lhs DsListComp.lhs DsMonad.lhs
Match.hi-boot Match.hi-boot-5 Match.lhs fptools/ghc/compiler/hsSyn
HsBinds.lhs HsExpr.hi-boot HsExpr.hi-boot-5 HsExpr.lhs ...
Simon Peyton Jones
simonpj@glass.cse.ogi.edu
Mon, 11 Jun 2001 05:24:53 -0700
simonpj 2001/06/11 05:24:53 PDT
Modified files:
ghc/compiler NOTES
ghc/compiler/deSugar DsBinds.lhs DsExpr.lhs DsGRHSs.lhs
DsListComp.lhs DsMonad.lhs Match.hi-boot
Match.hi-boot-5 Match.lhs
ghc/compiler/hsSyn HsBinds.lhs HsExpr.hi-boot
HsExpr.hi-boot-5 HsExpr.lhs
ghc/compiler/rename RnBinds.lhs RnEnv.lhs RnExpr.lhs
RnHsSyn.lhs RnSource.lhs
ghc/compiler/typecheck TcBinds.lhs TcExpr.lhs TcGenDeriv.lhs
TcHsSyn.lhs TcMatches.hi-boot
TcMatches.hi-boot-5 TcMatches.lhs
TcModule.lhs
Log:
--------------------------------------
Tidy up and improve "pattern contexts"
--------------------------------------
In various places (renamer, typechecker, desugarer) we need to know
what the context of a pattern match is (case expression, function defn,
let binding, etc). This commit tidies up the story quite a bit. I
think it represents a net decrease in code, and certainly it improves the
error messages from:
f x x = 3
Prevsiously we got a message like "Conflicting bindings for x in a pattern match",
but not it says "..in a defn of function f".
WARNING: the tidy up had a more global effect than I originally expected,
so it's possible that some other error messages look a bit peculiar. They
should be easy to fix, but tell us!
Revision Changes Path
1.9 +54 -0 fptools/ghc/compiler/NOTES
1.45 +2 -4 fptools/ghc/compiler/deSugar/DsBinds.lhs
1.68 +17 -19 fptools/ghc/compiler/deSugar/DsExpr.lhs
1.27 +3 -3 fptools/ghc/compiler/deSugar/DsGRHSs.lhs
1.32 +4 -3 fptools/ghc/compiler/deSugar/DsListComp.lhs
1.41 +2 -3 fptools/ghc/compiler/deSugar/DsMonad.lhs
1.5 +1 -1 fptools/ghc/compiler/deSugar/Match.hi-boot
1.4 +1 -1 fptools/ghc/compiler/deSugar/Match.hi-boot-5
1.50 +12 -12 fptools/ghc/compiler/deSugar/Match.lhs
1.55 +5 -6 fptools/ghc/compiler/hsSyn/HsBinds.lhs
1.10 +3 -4 fptools/ghc/compiler/hsSyn/HsExpr.hi-boot
1.7 +4 -5 fptools/ghc/compiler/hsSyn/HsExpr.hi-boot-5
1.54 +56 -47 fptools/ghc/compiler/hsSyn/HsExpr.lhs
1.66 +4 -4 fptools/ghc/compiler/rename/RnBinds.lhs
1.120 +2 -1 fptools/ghc/compiler/rename/RnEnv.lhs
1.73 +9 -9 fptools/ghc/compiler/rename/RnExpr.lhs
1.58 +1 -0 fptools/ghc/compiler/rename/RnHsSyn.lhs
1.124 +26 -12 fptools/ghc/compiler/rename/RnSource.lhs
1.91 +1 -1 fptools/ghc/compiler/typecheck/TcBinds.lhs
1.99 +2 -2 fptools/ghc/compiler/typecheck/TcExpr.lhs
1.71 +1 -1 fptools/ghc/compiler/typecheck/TcGenDeriv.lhs
1.59 +2 -0 fptools/ghc/compiler/typecheck/TcHsSyn.lhs
1.4 +2 -2 fptools/ghc/compiler/typecheck/TcMatches.hi-boot
1.4 +2 -3 fptools/ghc/compiler/typecheck/TcMatches.hi-boot-5
1.46 +19 -32 fptools/ghc/compiler/typecheck/TcMatches.lhs
1.117 +2 -2 fptools/ghc/compiler/typecheck/TcModule.lhs