From 1cdf171251a56baf0867b65a95c9bd59801ff912 Mon Sep 17 00:00:00 2001 From: krasimir Date: Fri, 11 Sep 2009 13:45:34 +0000 Subject: polish the PGF API and make Expr and Type abstract types. Tree is a type synonym of Expr --- src/PGF/Tree.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/PGF/Tree.hs') diff --git a/src/PGF/Tree.hs b/src/PGF/Tree.hs index 94802e70b..c2d2f33f5 100644 --- a/src/PGF/Tree.hs +++ b/src/PGF/Tree.hs @@ -5,7 +5,7 @@ module PGF.Tree ) where import PGF.CId -import PGF.Expr +import PGF.Expr hiding (Tree) import Data.Char import Data.List as List @@ -56,14 +56,14 @@ pTree isNested = RP.skipSpaces >> (pParen RP.<++ pAbs RP.<++ pApp RP.<++ fmap Li return (Fun f ts) ppTree d (Abs xs t) = ppParens (d > 0) (PP.char '\\' PP.<> - PP.hsep (PP.punctuate PP.comma (List.map (PP.text . prCId) xs)) PP.<+> + PP.hsep (PP.punctuate PP.comma (List.map ppCId xs)) PP.<+> PP.text "->" PP.<+> ppTree 0 t) -ppTree d (Fun f []) = PP.text (prCId f) -ppTree d (Fun f ts) = ppParens (d > 0) (PP.text (prCId f) PP.<+> PP.hsep (List.map (ppTree 1) ts)) +ppTree d (Fun f []) = ppCId f +ppTree d (Fun f ts) = ppParens (d > 0) (ppCId f PP.<+> PP.hsep (List.map (ppTree 1) ts)) ppTree d (Lit l) = ppLit l ppTree d (Meta n) = ppMeta n -ppTree d (Var id) = PP.text (prCId id) +ppTree d (Var id) = ppCId id ----------------------------------------------------- -- cgit v1.2.3