1
0
forked from GitHub/gf-core

Sketch of the new type checker for the concrete syntax. Enabled only with -new-comp

This commit is contained in:
kr.angelov
2011-11-29 12:12:51 +00:00
parent 1dd5af7729
commit fffc5f2507
5 changed files with 428 additions and 10 deletions

View File

@@ -19,6 +19,7 @@ module GF.Grammar.Printer
, ppConstrs
, ppLocation
, ppQIdent
, ppMeta
) where
import GF.Infra.Ident
@@ -26,6 +27,7 @@ import GF.Infra.Option
import GF.Grammar.Values
import GF.Grammar.Grammar
import PGF.Expr (ppMeta)
import PGF.Printer (ppFId, ppFunId, ppSeqId, ppSeq)
import Text.PrettyPrint
@@ -212,7 +214,7 @@ ppTerm q d (Sort id) = ppIdent id
ppTerm q d (K s) = str s
ppTerm q d (EInt n) = int n
ppTerm q d (EFloat f) = double f
ppTerm q d (Meta _) = char '?'
ppTerm q d (Meta i) = ppMeta i
ppTerm q d (Empty) = text "[]"
ppTerm q d (R []) = text "<>" -- to distinguish from {} empty RecType
ppTerm q d (R xs) = braces (fsep (punctuate semi [ppLabel l <+>