pattern macros: oper f : pattern T = # p ; used as #f in patterns

This commit is contained in:
aarne
2009-05-18 15:01:18 +00:00
parent 953c77a08a
commit 7508fa5785
4 changed files with 27 additions and 8 deletions

View File

@@ -563,7 +563,7 @@ inferLType gr trm = case trm of
t' <- justCheck t typeStr
aa' <- flip mapM aa (\ (c,v) -> do
c' <- justCheck c typeStr
v' <- justCheck v typeStrs
v' <- checks $ map (justCheck v) [typeStrs, EPattType typeStr]
return (c',v'))
return (Alts (t',aa'), typeStr)
@@ -607,7 +607,7 @@ inferLType gr trm = case trm of
EPattType ty -> do
ty' <- justCheck ty typeType
return (ty',typeType)
return (EPattType ty',typeType)
EPatt p -> do
ty <- inferPatt p
return (trm, EPattType ty)