[project @ 2002-07-29 12:22:37 by simonpj]
authorsimonpj <unknown>
Mon, 29 Jul 2002 12:22:38 +0000 (12:22 +0000)
committersimonpj <unknown>
Mon, 29 Jul 2002 12:22:38 +0000 (12:22 +0000)
commit2ddea0a849e8873f7943d9b32e501f6324e2e18b
treea41a1ccd8fffefc365557fd51a4a9d1928ca224a
parent94f8d8aefd7779d8b9ebb36b6bf46bf93bbfd98f
[project @ 2002-07-29 12:22:37 by simonpj]
*** MERGE TO STABLE BRANCH ***

Surprisingly large delta to make rebindable names work properly.
I was sloppily not checking the type of the user-supplied name,
and Ashley Yakeley's first experiment showed up the problem!

Solution: typechecker has to check both the 'standard' name and
the 'user' name and check the latter has a type compatible with the
former.

The main comment is with Inst.tcSyntaxName (a new function).
ghc/compiler/prelude/PrelNames.lhs
ghc/compiler/rename/RnEnv.lhs
ghc/compiler/rename/RnExpr.lhs
ghc/compiler/typecheck/Inst.lhs
ghc/compiler/typecheck/TcExpr.lhs
ghc/compiler/typecheck/TcPat.lhs