summaryrefslogtreecommitdiff
path: root/src/GF/Infra/CheckM.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2009-09-20 13:47:08 +0000
committerkrasimir <krasimir@chalmers.se>2009-09-20 13:47:08 +0000
commit96786c1136332efa9a889227c524ef8fe4e47fe8 (patch)
treede85af15a057c7b5d07b5dc618e5e7ba0844df84 /src/GF/Infra/CheckM.hs
parenta29a8e4f60960122874c737d32e9d41a3575208b (diff)
syntax for implicit arguments in GF
Diffstat (limited to 'src/GF/Infra/CheckM.hs')
-rw-r--r--src/GF/Infra/CheckM.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/GF/Infra/CheckM.hs b/src/GF/Infra/CheckM.hs
index efa65118b..a556e5c3a 100644
--- a/src/GF/Infra/CheckM.hs
+++ b/src/GF/Infra/CheckM.hs
@@ -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 =