From 6e4104ffa98279fcf105dd6386e1f7162f889fc0 Mon Sep 17 00:00:00 2001 From: aarne Date: Thu, 20 Sep 2007 21:51:54 +0000 Subject: compact printing of gf files --- src/GF/Source/GrammarToSource.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/GF/Source/GrammarToSource.hs') diff --git a/src/GF/Source/GrammarToSource.hs b/src/GF/Source/GrammarToSource.hs index 74c98b1bc..21382c7bd 100644 --- a/src/GF/Source/GrammarToSource.hs +++ b/src/GF/Source/GrammarToSource.hs @@ -107,8 +107,15 @@ trAnyDef (i,info) = let i' = tri i in case info of CncFun _ ptr ppr -> [P.DefLin [trDef i' nope ptr]] ---- P.DefPrintFun [P.PrintDef i' (trt pr)]] +{- + ---- encoding of AnyInd without changing syntax. AR 20/9/2007 + AnyInd s b -> + [P.DefOper [P.DDef [mkName i] + (P.EApp (P.EInt (if s then 1 else 0)) (P.EIdent (tri b)))]] +-} _ -> [] + trDef :: Ident -> Perh Type -> Perh Term -> P.Def trDef i pty ptr = case (pty,ptr) of (Nope, Nope) -> P.DDef [mkName i] (P.EMeta) --- @@ -243,4 +250,4 @@ trLabelIdent i = identC $ case i of LVar i -> "v" ++ show i --- should not happen mkName :: Ident -> P.Name -mkName = P.IdentName \ No newline at end of file +mkName = P.IdentName -- cgit v1.2.3