From 33ea630d4d431045c13e96c51e953ce0bafb4f0f Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 24 Sep 2004 08:46:03 +0000 Subject: bug fixes in parsing etc; improved ImperC --- src/GF/Grammar/LookAbs.hs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/GF/Grammar/LookAbs.hs') diff --git a/src/GF/Grammar/LookAbs.hs b/src/GF/Grammar/LookAbs.hs index 06e3ce3a5..ba809822a 100644 --- a/src/GF/Grammar/LookAbs.hs +++ b/src/GF/Grammar/LookAbs.hs @@ -105,6 +105,15 @@ allCatsOf gr = isModAbs m, (c, C.AbsCat cont _) <- tree2list (jments m)] +allBindCatsOf :: GFCGrammar -> [Cat] +allBindCatsOf gr = + nub [c | (i, ModMod m) <- modules gr, + isModAbs m, + (c, C.AbsFun typ _) <- tree2list (jments m), + Ok (cont,_) <- [firstTypeForm typ], + c <- concatMap fst $ errVal [] $ mapM (catSkeleton . snd) cont + ] + funsForType :: (Val -> Type -> Bool) -> GFCGrammar -> Val -> [(Fun,Type)] funsForType compat gr val = [(fun,typ) | (fun,typ) <- funRulesOf gr, compat val typ] -- cgit v1.2.3