summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2010-03-24 20:54:20 +0000
committerkrasimir <krasimir@chalmers.se>2010-03-24 20:54:20 +0000
commit9a1d0e8d11c4da5279cdbc86535b3e01a044278f (patch)
tree3a318107cc7449d1be2da658a3d42131f081a8e5 /src/compiler
parentfdd68f90403b28f332909aa095c30c18588a1bd7 (diff)
bugfix in the lProlog generator
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/GF/Compile/PGFtoLProlog.hs11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/compiler/GF/Compile/PGFtoLProlog.hs b/src/compiler/GF/Compile/PGFtoLProlog.hs
index 418eff2a4..e23f4e7f4 100644
--- a/src/compiler/GF/Compile/PGFtoLProlog.hs
+++ b/src/compiler/GF/Compile/PGFtoLProlog.hs
@@ -61,14 +61,11 @@ ppClause abstr d i scope f ty@(DTyp hyps cat args)
then hsep (map (\v -> text "pi" <+> ppCId v <+> char '\\') vars)
else empty
(goals,i'',head) = ppRes i' scope' cat (res : args)
- in (i'',(if null goals
- then empty
- else hsep (punctuate comma (map (ppExpr 0 i'' scope') goals)) <> comma)
- <+>
- (ppParens (d > 0) (quants <+> head <+>
- (if null hdocs
+ docs = map (ppExpr 0 i'' scope') goals ++ hdocs
+ in (i'',ppParens (d > 0) (quants <+> head <+>
+ (if null docs
then empty
- else text ":-" <+> hsep (punctuate comma hdocs)))))
+ else text ":-" <+> hsep (punctuate comma docs))))
where
ppRes i scope cat es =
let ((goals,i'),es') = mapAccumL (\(goals,i) e -> let (goals',i',e') = expr2goal abstr scope goals i e []