diff options
| author | krasimir <krasimir@chalmers.se> | 2009-09-11 13:45:34 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-09-11 13:45:34 +0000 |
| commit | 1cdf171251a56baf0867b65a95c9bd59801ff912 (patch) | |
| tree | 837e65fa23f3041c3bbf4b7f1dbfcf63990e09a1 /src/PGF/Tree.hs | |
| parent | 28a7c4b5c7659dc18166e06e914fb0a81c1c43bc (diff) | |
polish the PGF API and make Expr and Type abstract types. Tree is a type synonym of Expr
Diffstat (limited to 'src/PGF/Tree.hs')
| -rw-r--r-- | src/PGF/Tree.hs | 10 |
1 files changed, 5 insertions, 5 deletions
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 ----------------------------------------------------- |
