summaryrefslogtreecommitdiff
path: root/src/GF/Grammar/LookAbs.hs
diff options
context:
space:
mode:
authoraarne <unknown>2004-08-13 13:21:46 +0000
committeraarne <unknown>2004-08-13 13:21:46 +0000
commit69aa3248d2ea878ef45e9e8c177381730d949c32 (patch)
treeb412e7238c9690fab1867159b5c6a1e4336fb59a /src/GF/Grammar/LookAbs.hs
parenta7605447420a6acdde087a6bd7be6ef2d0dd12cd (diff)
unique ref
Diffstat (limited to 'src/GF/Grammar/LookAbs.hs')
-rw-r--r--src/GF/Grammar/LookAbs.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/GF/Grammar/LookAbs.hs b/src/GF/Grammar/LookAbs.hs
index cc414596f..06e3ce3a5 100644
--- a/src/GF/Grammar/LookAbs.hs
+++ b/src/GF/Grammar/LookAbs.hs
@@ -81,15 +81,15 @@ lookupRef gr binds at = case at of
K _ -> return valAbsString
_ -> prtBad "cannot refine with complex term" at ---
-refsForType :: (Val -> Type -> Bool) -> GFCGrammar -> Binds -> Val -> [(Term,Val)]
-refsForType compat gr binds val =
- -- bound variables
- [(vr i, t) | (i,t) <- binds, Ok ty <- [val2exp t], compat val ty] ++
- -- integer and string literals
- [(EInt i, val) | val == valAbsInt, i <- [0,1,2,5,11,1978]] ++
- [(K s, val) | val == valAbsString, s <- ["foo", "NN", "x"]] ++
- -- functions defined in the current abstract syntax
- [(qq f, vClos t) | (f,t) <- funsForType compat gr val]
+refsForType :: (Val -> Type -> Bool) -> GFCGrammar -> Binds -> Val -> [(Term,(Val,Bool))]
+refsForType compat gr binds val =
+ -- bound variables --- never recursive?
+ [(vr i, (t,False)) | (i,t) <- binds, Ok ty <- [val2exp t], compat val ty] ++
+ -- integer and string literals
+ [(EInt i, (val,False)) | val == valAbsInt, i <- [0,1,2,5,11,1978]] ++
+ [(K s, (val,False)) | val == valAbsString, s <- ["foo", "NN", "x"]] ++
+ -- functions defined in the current abstract syntax
+ [(qq f, (vClos t,isRecursiveType t)) | (f,t) <- funsForType compat gr val]
funRulesOf :: GFCGrammar -> [(Fun,Type)]