projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make another parse error more informative
[ghc-hetmet.git]
/
compiler
/
typecheck
/
Inst.lhs
diff --git
a/compiler/typecheck/Inst.lhs
b/compiler/typecheck/Inst.lhs
index
2e08113
..
b237778
100644
(file)
--- a/
compiler/typecheck/Inst.lhs
+++ b/
compiler/typecheck/Inst.lhs
@@
-20,7
+20,7
@@
module Inst (
cloneDict, mkOverLit,
newIPDict, newMethod, newMethodFromName, newMethodWithGivenTy,
tcInstClassOp,
cloneDict, mkOverLit,
newIPDict, newMethod, newMethodFromName, newMethodWithGivenTy,
tcInstClassOp,
- tcSyntaxName, isHsVar,
+ tcSyntaxName,
tyVarsOfInst, tyVarsOfInsts, tyVarsOfLIE, tcTyVarsOfInst,
tcTyVarsOfInsts, ipNamesOfInst, ipNamesOfInsts, fdPredsOfInst,
tyVarsOfInst, tyVarsOfInsts, tyVarsOfLIE, tcTyVarsOfInst,
tcTyVarsOfInsts, ipNamesOfInst, ipNamesOfInsts, fdPredsOfInst,
@@
-62,7
+62,7
@@
import InstEnv
import FunDeps
import TcMType
import TcType
import FunDeps
import TcMType
import TcType
-import MkCore
+import MkCore ( mkBigCoreTupTy )
import TyCon
import Type
import TypeRep
import TyCon
import Type
import TypeRep
@@
-246,7
+246,9
@@
tyVarsOfLIE lie = tyVarsOfInsts (lieToList lie)
--------------------------
instToDictBind :: Inst -> LHsExpr TcId -> TcDictBinds
instToDictBind inst rhs
--------------------------
instToDictBind :: Inst -> LHsExpr TcId -> TcDictBinds
instToDictBind inst rhs
- = unitBag (L (instSpan inst) (VarBind (instToId inst) rhs))
+ = unitBag (L (instSpan inst) (VarBind { var_id = instToId inst
+ , var_rhs = rhs
+ , var_inline = False }))
addInstToDictBind :: TcDictBinds -> Inst -> LHsExpr TcId -> TcDictBinds
addInstToDictBind binds inst rhs = binds `unionBags` instToDictBind inst rhs
addInstToDictBind :: TcDictBinds -> Inst -> LHsExpr TcId -> TcDictBinds
addInstToDictBind binds inst rhs = binds `unionBags` instToDictBind inst rhs
@@
-570,10
+572,6
@@
mkOverLit (HsFractional r)
; return (HsRat r rat_ty) }
mkOverLit (HsIsString s) = return (HsString s)
; return (HsRat r rat_ty) }
mkOverLit (HsIsString s) = return (HsString s)
-
-isHsVar :: HsExpr Name -> Name -> Bool
-isHsVar (HsVar f) g = f == g
-isHsVar _ _ = False
\end{code}
\end{code}
@@
-871,7
+869,7
@@
lookupSimpleInst (Dict {tci_pred = pred, tci_loc = loc})
{ use_stage <- getStage
; checkWellStaged (ptext (sLit "instance for") <+> quotes (ppr pred))
{ use_stage <- getStage
; checkWellStaged (ptext (sLit "instance for") <+> quotes (ppr pred))
- (topIdLvl dfun_id) use_stage
+ (topIdLvl dfun_id) (thLevel use_stage)
-- It's possible that not all the tyvars are in
-- the substitution, tenv. For example:
-- It's possible that not all the tyvars are in
-- the substitution, tenv. For example:
@@
-1177,7
+1175,7
@@
mkEqInst (EqPred ty1 ty2) co
; return inst
}
where
; return inst
}
where
- mkName uniq src_span = mkInternalName uniq (mkVarOcc "co") src_span
+ mkName uniq src_span = mkInternalName uniq (mkVarOcc "co_ei") src_span
mkEqInst pred _ = pprPanic "mkEqInst" (ppr pred)
mkWantedEqInst :: PredType -> TcM Inst
mkEqInst pred _ = pprPanic "mkEqInst" (ppr pred)
mkWantedEqInst :: PredType -> TcM Inst