[project @ 2001-03-13 14:58:25 by simonpj]
---------------- Nuke ClassContext ---------------- This commit tidies up a long-standing inconsistency in GHC. The context of a class or instance decl used to be restricted to predicates of the form C t1 .. tn with type ClassContext = [(Class,[Type])] but everywhere else in the compiler we used type ThetaType = [PredType] where PredType can be any sort of constraint (= predicate). The inconsistency actually led to a crash, when compiling class (?x::Int) => C a where {} I've tidied all this up by nuking ClassContext altogether, and using PredType throughout. Lots of modified files, but all in more-or-less trivial ways. I've also added a check that the context of a class or instance decl doesn't include a non-inheritable predicate like (?x::Int). Other things * rename constructor 'Class' from type TypeRep.Pred to 'ClassP' (makes it easier to grep for) * rename constructor HsPClass => HsClassP HsPIParam => HsIParam
Showing
- ghc/compiler/basicTypes/DataCon.lhs 13 additions, 13 deletionsghc/compiler/basicTypes/DataCon.lhs
- ghc/compiler/basicTypes/MkId.lhs 5 additions, 8 deletionsghc/compiler/basicTypes/MkId.lhs
- ghc/compiler/coreSyn/Subst.lhs 4 additions, 9 deletionsghc/compiler/coreSyn/Subst.lhs
- ghc/compiler/deSugar/DsForeign.lhs 1 addition, 1 deletionghc/compiler/deSugar/DsForeign.lhs
- ghc/compiler/hsSyn/HsTypes.lhs 13 additions, 13 deletionsghc/compiler/hsSyn/HsTypes.lhs
- ghc/compiler/ilxGen/IlxGen.lhs 23 additions, 22 deletionsghc/compiler/ilxGen/IlxGen.lhs
- ghc/compiler/main/CodeOutput.lhs 3 additions, 1 deletionghc/compiler/main/CodeOutput.lhs
- ghc/compiler/main/DriverPipeline.hs 2 additions, 2 deletionsghc/compiler/main/DriverPipeline.hs
- ghc/compiler/parser/ParseUtil.lhs 2 additions, 2 deletionsghc/compiler/parser/ParseUtil.lhs
- ghc/compiler/parser/RdrHsSyn.lhs 2 additions, 2 deletionsghc/compiler/parser/RdrHsSyn.lhs
- ghc/compiler/prelude/TysWiredIn.lhs 2 additions, 2 deletionsghc/compiler/prelude/TysWiredIn.lhs
- ghc/compiler/rename/ParseIface.y 2 additions, 2 deletionsghc/compiler/rename/ParseIface.y
- ghc/compiler/rename/RnHsSyn.lhs 2 additions, 2 deletionsghc/compiler/rename/RnHsSyn.lhs
- ghc/compiler/rename/RnSource.lhs 6 additions, 6 deletionsghc/compiler/rename/RnSource.lhs
- ghc/compiler/typecheck/Inst.lhs 48 additions, 80 deletionsghc/compiler/typecheck/Inst.lhs
- ghc/compiler/typecheck/TcClassDcl.lhs 13 additions, 14 deletionsghc/compiler/typecheck/TcClassDcl.lhs
- ghc/compiler/typecheck/TcDefaults.lhs 2 additions, 2 deletionsghc/compiler/typecheck/TcDefaults.lhs
- ghc/compiler/typecheck/TcDeriv.lhs 7 additions, 10 deletionsghc/compiler/typecheck/TcDeriv.lhs
- ghc/compiler/typecheck/TcEnv.lhs 4 additions, 4 deletionsghc/compiler/typecheck/TcEnv.lhs
- ghc/compiler/typecheck/TcExpr.lhs 10 additions, 10 deletionsghc/compiler/typecheck/TcExpr.lhs
Loading
Please register or sign in to comment