diff options
| author | krasimir <krasimir@chalmers.se> | 2010-05-11 12:50:51 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-05-11 12:50:51 +0000 |
| commit | e8099d1f51100413797f2403f06117977337ac41 (patch) | |
| tree | 970f0d3c719c85de77ca6c3505cca76e64514b99 /src/runtime/haskell | |
| parent | 922713d7c00777b930c1371ca9b147b06f41d1e5 (diff) | |
in PGF, when printing function and category definitions, add semicolon
Diffstat (limited to 'src/runtime/haskell')
| -rw-r--r-- | src/runtime/haskell/PGF/Printer.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/haskell/PGF/Printer.hs b/src/runtime/haskell/PGF/Printer.hs index fa6c5e549..aab89ee5d 100644 --- a/src/runtime/haskell/PGF/Printer.hs +++ b/src/runtime/haskell/PGF/Printer.hs @@ -26,19 +26,19 @@ ppAbs name a = text "abstract" <+> ppCId name <+> char '{' $$ char '}' ppFlag :: CId -> Literal -> Doc -ppFlag flag value = text "flag" <+> ppCId flag <+> char '=' <+> ppLit value ; +ppFlag flag value = text "flag" <+> ppCId flag <+> char '=' <+> ppLit value <+> char ';' ppCat :: CId -> ([Hypo],[CId]) -> Doc -ppCat c (hyps,_) = text "cat" <+> ppCId c <+> hsep (snd (mapAccumL (ppHypo 4) [] hyps)) +ppCat c (hyps,_) = text "cat" <+> ppCId c <+> hsep (snd (mapAccumL (ppHypo 4) [] hyps)) <+> char ';' ppFun :: CId -> (Type,Int,Maybe [Equation]) -> Doc -ppFun f (t,_,Just eqs) = text "fun" <+> ppCId f <+> colon <+> ppType 0 [] t $$ +ppFun f (t,_,Just eqs) = text "fun" <+> ppCId f <+> colon <+> ppType 0 [] t <+> char ';' $$ if null eqs then empty else text "def" <+> vcat [let scope = foldl pattScope [] patts ds = map (ppPatt 9 scope) patts - in ppCId f <+> hsep ds <+> char '=' <+> ppExpr 0 scope res | Equ patts res <- eqs] -ppFun f (t,_,Nothing) = text "data" <+> ppCId f <+> colon <+> ppType 0 [] t + in ppCId f <+> hsep ds <+> char '=' <+> ppExpr 0 scope res <+> char ';' | Equ patts res <- eqs] +ppFun f (t,_,Nothing) = text "data" <+> ppCId f <+> colon <+> ppType 0 [] t <+> char ';' ppCnc :: Language -> Concr -> Doc ppCnc name cnc = |
