summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Grammar/Values.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2015-03-05 14:47:36 +0000
committerkrasimir <krasimir@chalmers.se>2015-03-05 14:47:36 +0000
commit023857961036e6165bae1298c24f13bcc493de75 (patch)
tree2971a30dcbb1cd83833761aecf7d171ad84a96be /src/compiler/GF/Grammar/Values.hs
parent7539809461f1c64fc38e15adc4a02068ceeb332c (diff)
remove some more old code
Diffstat (limited to 'src/compiler/GF/Grammar/Values.hs')
-rw-r--r--src/compiler/GF/Grammar/Values.hs46
1 files changed, 3 insertions, 43 deletions
diff --git a/src/compiler/GF/Grammar/Values.hs b/src/compiler/GF/Grammar/Values.hs
index 7bfc8a24b..3cfd79ad7 100644
--- a/src/compiler/GF/Grammar/Values.hs
+++ b/src/compiler/GF/Grammar/Values.hs
@@ -13,45 +13,26 @@
-----------------------------------------------------------------------------
module GF.Grammar.Values (-- ** Values used in TC type checking
- Exp, Val(..), Env,
+ Val(..), Env,
-- ** Annotated tree used in editing
---Z Tree, TrNode(..), Atom(..),
Binds, Constraints, MetaSubst,
-- ** For TC
valAbsInt, valAbsFloat, valAbsString, vType,
isPredefCat,
eType,
---Z tree2exp, loc2treeFocus
) where
---import GF.Data.Operations
----Z import GF.Data.Zipper
-
import GF.Infra.Ident
import GF.Grammar.Grammar
import GF.Grammar.Predef
-- values used in TC type checking
-type Exp = Term
-
-data Val = VGen Int Ident | VApp Val Val | VCn QIdent | VRecType [(Label,Val)] | VType | VClos Env Exp
+data Val = VGen Int Ident | VApp Val Val | VCn QIdent | VRecType [(Label,Val)] | VType | VClos Env Term
deriving (Eq,Show)
type Env = [(Ident,Val)]
-{-
--- annotated tree used in editing
-
-type Tree = Tr TrNode
-
-newtype TrNode = N (Binds,Atom,Val,(Constraints,MetaSubst),Bool)
- deriving (Eq,Show)
-
-data Atom =
- AtC Fun | AtM MetaId | AtV Ident | AtL String | AtI Integer | AtF Double
- deriving (Eq,Show)
--}
type Binds = [(Ident,Val)]
type Constraints = [(Val,Val)]
type MetaSubst = [(MetaId,Val)]
@@ -71,26 +52,5 @@ valAbsString = VCn (cPredefAbs, cString)
vType :: Val
vType = VType
-eType :: Exp
+eType :: Term
eType = Sort cType
-
-{-
-tree2exp :: Tree -> Exp
-tree2exp (Tr (N (bi,at,_,_,_),ts)) = foldr Abs (foldl App at' ts') bi' where
- at' = case at of
- AtC (m,c) -> Q m c
- AtV i -> Vr i
- AtM m -> Meta m
- AtL s -> K s
- AtI s -> EInt s
- AtF s -> EFloat s
- bi' = map fst bi
- ts' = map tree2exp ts
-
-loc2treeFocus :: Loc TrNode -> Tree
-loc2treeFocus (Loc (Tr (a,ts),p)) =
- loc2tree (Loc (Tr (mark a, map (mapTr nomark) ts), mapPath nomark p))
- where
- (mark, nomark) = (\(N (a,b,c,d,_)) -> N(a,b,c,d,True),
- \(N (a,b,c,d,_)) -> N(a,b,c,d,False))
--}