1
0
forked from GitHub/gf-core

syntax for implicit arguments in GF

This commit is contained in:
krasimir
2009-09-20 13:47:08 +00:00
parent a29a8e4f60
commit 96786c1136
20 changed files with 309 additions and 339 deletions

View File

@@ -80,9 +80,9 @@ checkGetContext = Check (\ctxt msgs -> Success ctxt ctxt msgs)
checkLookup :: Ident -> Check Type
checkLookup x = do
co <- checkGetContext
case lookup x co of
Nothing -> checkError (text "unknown variable" <+> ppIdent x)
Just ty -> return ty
case [ty | (b,y,ty) <- co, x == y] of
[] -> checkError (text "unknown variable" <+> ppIdent x)
(ty:_) -> return ty
runCheck :: Check a -> Either [Message] (a,Context,[Message])
runCheck c =