X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=utils%2Fext-core%2FPrep.hs;fp=utils%2Fext-core%2FPrep.hs;h=4528d54f55d63b5a00c0b18cac8982d405fb7692;hp=0a105c1b5229667cba1ef4292ad9cb6e69a286d4;hb=6e93da5e0a775b2bfb9c9f2bd31a36cc828521cb;hpb=5d1ba397950bd700768933cc573f04a804f6e32a diff --git a/utils/ext-core/Prep.hs b/utils/ext-core/Prep.hs index 0a105c1..4528d54 100644 --- a/utils/ext-core/Prep.hs +++ b/utils/ext-core/Prep.hs @@ -46,7 +46,7 @@ prepModule globalEnv (Module mn tdefs vdefgs) = prepExp (venv,tvenv) (Lam (Vb vb) e) = Lam (Vb vb) (prepExp (eextend venv vb,tvenv) e) prepExp (venv,tvenv) (Lam (Tb tb) e) = Lam (Tb tb) (prepExp (venv,eextend tvenv tb) e) prepExp env@(venv,tvenv) (Let (Nonrec(Vdef((Nothing,x),t,b))) e) - | kindof tvenv t == Kunlifted && suspends b = + | kindof tvenv t `eqKind` Kunlifted && suspends b = -- There are two places where we call the typechecker, one of them -- here. -- We need to know the type of the let body in order to construct @@ -86,7 +86,7 @@ prepModule globalEnv (Module mn tdefs vdefgs) = where g e (v,t) = Lam (Vb(v,t)) (App e (Var (unqual v))) rewindApp env e [] = e - rewindApp env@(venv,tvenv) e1 (Left e2:as) | kindof tvenv t == Kunlifted && suspends e2 = + rewindApp env@(venv,tvenv) e1 (Left e2:as) | kindof tvenv t `eqKind` Kunlifted && suspends e2 = -- This is the other place where we call the typechecker. Case (prepExp env' e2) (v,t) (typeOfExp env rhs) [Adefault rhs] where rhs = (rewindApp env' (App e1 (Var (unqual v))) as)