summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/PGFtoProlog.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2010-03-24 11:11:55 +0000
committerkrasimir <krasimir@chalmers.se>2010-03-24 11:11:55 +0000
commit68482aa7e9882ab8d65fb5fe261efc0e807f6dfd (patch)
treeb818f5c25002f0be2eefad441e62aa08c959cbe6 /src/compiler/GF/Compile/PGFtoProlog.hs
parent76d155af0eb6174e479ec6c2023554984c14106f (diff)
now for every category we store, in PGF, the list of functions for it in source-code order. The order matters for the termination of the exhaustive generation with dependent types.
Diffstat (limited to 'src/compiler/GF/Compile/PGFtoProlog.hs')
-rw-r--r--src/compiler/GF/Compile/PGFtoProlog.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/GF/Compile/PGFtoProlog.hs b/src/compiler/GF/Compile/PGFtoProlog.hs
index 896e18934..3a5df0256 100644
--- a/src/compiler/GF/Compile/PGFtoProlog.hs
+++ b/src/compiler/GF/Compile/PGFtoProlog.hs
@@ -51,7 +51,7 @@ clauseHeader hdr clauses = "":hdr:clauses
-- abstract syntax
plAbstract :: (CId, Abstr) -> [String]
-plAbstract (name, Abstr aflags funs cats _catfuns) =
+plAbstract (name, Abstr aflags funs cats) =
["", "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%",
"%% abstract module: " ++ plp name] ++
clauseHeader "%% absflag(?Flag, ?Value): flags for abstract syntax"
@@ -63,8 +63,8 @@ plAbstract (name, Abstr aflags funs cats _catfuns) =
clauseHeader "%% def(?Fun, ?Expr)"
(concatMap plFundef (Map.assocs funs))
-plCat :: (CId, [Hypo]) -> String
-plCat (cat, hypos) = plFact "cat" (plTypeWithHypos typ)
+plCat :: (CId, ([Hypo],[CId])) -> String
+plCat (cat, (hypos,_)) = plFact "cat" (plTypeWithHypos typ)
where ((_,subst), hypos') = mapAccumL alphaConvertHypo emptyEnv hypos
args = reverse [EFun x | (_,x) <- subst]
typ = DTyp hypos' cat args