summaryrefslogtreecommitdiff
path: root/src/GF/Conversion/RemoveErasing.hs
diff options
context:
space:
mode:
authorpeb <peb@cs.chalmers.se>2006-03-09 12:39:11 +0000
committerpeb <peb@cs.chalmers.se>2006-03-09 12:39:11 +0000
commit00d3d0b27dae7279527837f2d3a1177edb014761 (patch)
treef5e7ae7ba781b8729a8db79c6fa3fd438f0d35b9 /src/GF/Conversion/RemoveErasing.hs
parent641fa54ddc11b1a4fd0cfab1aaa791f4ddedd889 (diff)
fixing prolog printing
Diffstat (limited to 'src/GF/Conversion/RemoveErasing.hs')
-rw-r--r--src/GF/Conversion/RemoveErasing.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/GF/Conversion/RemoveErasing.hs b/src/GF/Conversion/RemoveErasing.hs
index 0062e5f36..8185e4f02 100644
--- a/src/GF/Conversion/RemoveErasing.hs
+++ b/src/GF/Conversion/RemoveErasing.hs
@@ -80,11 +80,17 @@ newRules grammar chart (NC newCat@(MCat cat lbls))
newProfile = snd $ mapAccumL accumProf 0 $
map (lookupAssoc argsInLin) [0 .. length args-1]
accumProf nr = maybe (nr, Unify []) $ const (nr+1, Unify [nr])
- newName = Name fun (newProfile `composeProfiles` profile)
+ newName = -- tracePrt "newName" (prtNewName profile newProfile) $
+ Name fun (profile `composeProfiles` newProfile)
guard $ all (not . null) argLbls
return $ NR (Rule (Abs newCat newArgs newName) (Cnc lbls argLbls newLins))
+
+prtNewName :: [Profile (SyntaxForest Fun)] -> [Profile (SyntaxForest Fun)] -> Name -> String
+prtNewName p p' n = prt p ++ " .o. " ++ prt p' ++ " : " ++ prt n
+
+
initialCatsTD grammar starts =
[ cat | cat@(NC (MCat (ECat start _) _)) <- initialCatsBU grammar,
start `elem` starts ]