From f870c4d80f9e1b55a18c54f8119e5ed11f9d14e1 Mon Sep 17 00:00:00 2001 From: krasimir Date: Thu, 18 Mar 2010 19:34:30 +0000 Subject: syntax for inaccessible patterns in GF --- src/runtime/haskell/PGF/Printer.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/runtime/haskell/PGF/Printer.hs') diff --git a/src/runtime/haskell/PGF/Printer.hs b/src/runtime/haskell/PGF/Printer.hs index 353b06f86..23bdc718d 100644 --- a/src/runtime/haskell/PGF/Printer.hs +++ b/src/runtime/haskell/PGF/Printer.hs @@ -35,7 +35,8 @@ ppFun :: CId -> (Type,Int,Maybe [Equation]) -> Doc ppFun f (t,_,Just eqs) = text "fun" <+> ppCId f <+> colon <+> ppType 0 [] t $$ if null eqs then empty - else text "def" <+> vcat [let (scope,ds) = mapAccumL (ppPatt 9) [] patts + 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 -- cgit v1.2.3