summaryrefslogtreecommitdiff
path: root/src-3.0/GF/Grammar/PrGrammar.hs
diff options
context:
space:
mode:
authorkr.angelov <kr.angelov@chalmers.se>2008-05-22 11:59:31 +0000
committerkr.angelov <kr.angelov@chalmers.se>2008-05-22 11:59:31 +0000
commitdf0c4f81fa9c620d7c63af79c0b183a6beccf0bd (patch)
tree0cdc80b29f8f5df0ad280f17be0ba9d46fbd948c /src-3.0/GF/Grammar/PrGrammar.hs
parent6394f3ccfbb9d14017393b433a38a3921f1083e5 (diff)
remove all files that aren't used in GF-3.0
Diffstat (limited to 'src-3.0/GF/Grammar/PrGrammar.hs')
-rw-r--r--src-3.0/GF/Grammar/PrGrammar.hs39
1 files changed, 1 insertions, 38 deletions
diff --git a/src-3.0/GF/Grammar/PrGrammar.hs b/src-3.0/GF/Grammar/PrGrammar.hs
index c3a21d1d6..186792eda 100644
--- a/src-3.0/GF/Grammar/PrGrammar.hs
+++ b/src-3.0/GF/Grammar/PrGrammar.hs
@@ -29,7 +29,7 @@ module GF.Grammar.PrGrammar (Print(..),
tree2string, prprTree,
prConstrs, prConstraints,
prMetaSubst, prEnv, prMSubst,
- prExp, prPatt, prOperSignature,
+ prExp, prOperSignature,
lookupIdent, lookupIdentInfo
) where
@@ -38,8 +38,6 @@ import GF.Data.Zipper
import GF.Grammar.Grammar
import GF.Infra.Modules
import qualified GF.Source.PrintGF as P
-import qualified GF.Canon.PrintGFC as C
-import qualified GF.Canon.AbsGFC as A
import GF.Grammar.Values
import GF.Source.GrammarToSource
--- import GFC (CanonGrammar) --- cycle of modules
@@ -106,32 +104,6 @@ prContext co = unwords $ map prParenth [prt x +++ ":" +++ prt t | (x,t) <- co]
-- some GFC notions
-instance Print A.Exp where prt = C.printTree
-instance Print A.Term where prt = C.printTree
-instance Print A.Case where prt = C.printTree
-instance Print A.CType where prt = C.printTree
-instance Print A.Label where prt = C.printTree
-instance Print A.Module where prt = C.printTree
-instance Print A.Def where prt = C.printTree
-instance Print A.Canon where prt = C.printTree
-instance Print A.Sort where prt = C.printTree
-
-instance Print A.Atom where
- prt = C.printTree
- prt_ (A.AC c) = prt_ c
- prt_ (A.AD c) = prt_ c
- prt_ a = prt a
-
-instance Print A.Patt where
- prt = C.printTree
- prt_ = prPatt
-
-instance Print A.CIdent where
- prt = C.printTree
- prt_ (A.CIQ _ c) = prt c
-
--- printing values and trees in editing
-
instance Print a => Print (Tr a) where
prt (Tr (n, trees)) = prt n +++ unwords (map prt2 trees)
prt2 t@(Tr (_,args)) = if null args then prt t else prParenth (prt t)
@@ -252,15 +224,6 @@ prExp e = case e of
App _ _ -> prParenth $ prExp e
_ -> pr1 e
-prPatt :: A.Patt -> String
-prPatt p = case p of
- A.PC c ps -> prt_ c +++ unwords (map pr1 ps)
- _ -> prt p --- PR
- where
- pr1 p = case p of
- A.PC _ (_:_) -> prParenth $ prPatt p
- _ -> prPatt p
-
-- | option @-strip@ strips qualifications
prTermOpt :: Options -> Term -> String
prTermOpt opts = if oElem nostripQualif opts then prt else prExp