1
0
forked from GitHub/gf-core

remove some dead types from GF.Grammar.Grammar

This commit is contained in:
krasimir
2009-01-20 14:33:42 +00:00
parent d6e917b5a1
commit e3892b82c0
5 changed files with 10 additions and 19 deletions

View File

@@ -164,7 +164,7 @@ inferExp th tenv@(k,rho,gamma) e = case e of
_ -> prtBad ("Prod expected for function" +++ prt f +++ "instead of") typ
_ -> prtBad "cannot infer type of expression" e
checkEqs :: Theory -> TCEnv -> (Fun,Trm) -> Val -> Err [(Val,Val)]
checkEqs :: Theory -> TCEnv -> (Fun,Term) -> Val -> Err [(Val,Val)]
checkEqs th tenv@(k,rho,gamma) (fun@(m,f),def) val = case def of
Eqs es -> liftM concat $ mapM checkBranch es
_ -> liftM snd $ checkExp th tenv def val

View File

@@ -106,7 +106,7 @@ checkContext st = checkTyp st . cont2exp
checkTyp :: Grammar -> Type -> [String]
checkTyp gr typ = err singleton prConstrs $ justTypeCheck gr typ vType
checkEquation :: Grammar -> Fun -> Trm -> [String]
checkEquation :: Grammar -> Fun -> Term -> [String]
checkEquation gr (m,fun) def = err singleton id $ do
typ <- lookupFunType gr m fun
cs <- justTypeCheck gr def (vClos typ)