From 49ca46d95835a74ec581431e668612b3b3589350 Mon Sep 17 00:00:00 2001 From: krasimir Date: Thu, 17 Sep 2009 13:14:04 +0000 Subject: bugfix in the ai command --- src/PGF/Expr.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/PGF') diff --git a/src/PGF/Expr.hs b/src/PGF/Expr.hs index 97eb49f00..48d286ea1 100644 --- a/src/PGF/Expr.hs +++ b/src/PGF/Expr.hs @@ -186,10 +186,11 @@ ppExpr d scope (EFun f) = ppCId f ppExpr d scope (EVar i) = ppCId (scope !! i) ppExpr d scope (ETyped e ty)= ppParens (d > 0) (ppExpr 0 scope e PP.<+> PP.colon PP.<+> ppType 0 scope ty) +ppPatt :: Int -> [CId] -> Patt -> ([CId],PP.Doc) ppPatt d scope (PApp f ps) = let (scope',ds) = mapAccumL (ppPatt 2) scope ps in (scope',ppParens (not (List.null ps) && d > 1) (ppCId f PP.<+> PP.hsep ds)) ppPatt d scope (PLit l) = (scope,ppLit l) -ppPatt d scope (PVar f) = (scope,ppCId f) +ppPatt d scope (PVar f) = (f:scope,ppCId f) ppPatt d scope PWild = (scope,PP.char '_') ppLit (LStr s) = PP.text (show s) -- cgit v1.2.3