diff options
| author | aarne <aarne@cs.chalmers.se> | 2008-12-08 14:25:11 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2008-12-08 14:25:11 +0000 |
| commit | e009048e0865264b9498d1429d1a01d3331e5f55 (patch) | |
| tree | 582ae67f61f6ae4f6536c8e94da221b11afb431d /src/GF/Grammar/Values.hs | |
| parent | 75ecc5f97b132ac9df06e898591803511e6c98bf (diff) | |
removed dependencies of Zipper and editor in GF grammar compiler
Diffstat (limited to 'src/GF/Grammar/Values.hs')
| -rw-r--r-- | src/GF/Grammar/Values.hs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/GF/Grammar/Values.hs b/src/GF/Grammar/Values.hs index ab7d874da..c83ced9df 100644 --- a/src/GF/Grammar/Values.hs +++ b/src/GF/Grammar/Values.hs @@ -15,15 +15,17 @@ module GF.Grammar.Values (-- * values used in TC type checking Exp, Val(..), Env, -- * annotated tree used in editing - Tree, TrNode(..), Atom(..), Binds, Constraints, MetaSubst, +--Z Tree, TrNode(..), Atom(..), + Binds, Constraints, MetaSubst, -- * for TC valAbsInt, valAbsFloat, valAbsString, vType, isPredefCat, - eType, tree2exp, loc2treeFocus + eType, +--Z tree2exp, loc2treeFocus ) where import GF.Data.Operations -import GF.Data.Zipper +---Z import GF.Data.Zipper import GF.Infra.Ident import GF.Grammar.Grammar @@ -38,6 +40,7 @@ data Val = VGen Int Ident | VApp Val Val | VCn QIdent | VType | VClos Env Exp type Env = [(Ident,Val)] +{- -- annotated tree used in editing type Tree = Tr TrNode @@ -48,11 +51,12 @@ newtype TrNode = N (Binds,Atom,Val,(Constraints,MetaSubst),Bool) data Atom = AtC Fun | AtM MetaSymb | AtV Ident | AtL String | AtI Integer | AtF Double deriving (Eq,Show) - +-} type Binds = [(Ident,Val)] type Constraints = [(Val,Val)] type MetaSubst = [(MetaSymb,Val)] + -- for TC valAbsInt :: Val @@ -70,6 +74,7 @@ vType = VType eType :: Exp eType = Sort cType +{- tree2exp :: Tree -> Exp tree2exp (Tr (N (bi,at,_,_,_),ts)) = foldr Abs (foldl App at' ts') bi' where at' = case at of @@ -88,4 +93,4 @@ loc2treeFocus (Loc (Tr (a,ts),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)) - +-} |
