mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-08-19 10:46:22 -06:00
remove the old evaluator
This commit is contained in:
@@ -19,7 +19,7 @@ import GF.Grammar.Analyse
|
||||
import GF.Grammar.ShowTerm
|
||||
import GF.Grammar.Lookup (allOpers,allOpersTo)
|
||||
import GF.Compile.Rename(renameSourceTerm)
|
||||
import GF.Compile.Compute.Concrete2(normalForm,normalFlatForm,Globals(..),stdPredef)
|
||||
import GF.Compile.Compute.Concrete(normalForm,normalFlatForm,Globals(..),stdPredef)
|
||||
import GF.Compile.TypeCheck.Concrete as TC(inferLType)
|
||||
|
||||
import GF.Command.Abstract(Option(..),isOpt,listFlags,valueString,valStrOpts)
|
||||
|
||||
@@ -28,7 +28,7 @@ import GF.Infra.Option
|
||||
|
||||
import GF.Compile.TypeCheck.Abstract
|
||||
import GF.Compile.TypeCheck.Concrete(checkLType,inferLType)
|
||||
import GF.Compile.Compute.Concrete2(normalForm,Globals(..),stdPredef)
|
||||
import GF.Compile.Compute.Concrete(normalForm,Globals(..),stdPredef)
|
||||
|
||||
import GF.Grammar
|
||||
import GF.Grammar.Lexer
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -13,7 +13,7 @@ import GF.Grammar.Macros
|
||||
import GF.Grammar.Predef
|
||||
import GF.Grammar.Printer hiding (ppValue)
|
||||
import GF.Text.Pretty hiding (empty)
|
||||
import GF.Compile.Compute.Concrete2 hiding ( getMeta, setMeta, globals, variants )
|
||||
import GF.Compile.Compute.Concrete hiding ( getMeta, setMeta, globals, variants )
|
||||
import qualified GF.Text.Pretty as PP
|
||||
import qualified Data.Map as Map
|
||||
import qualified Data.Set as Set
|
||||
|
||||
@@ -9,7 +9,7 @@ import GF.Grammar
|
||||
import GF.Grammar.Lookup(allOrigInfos,lookupOrigInfo)
|
||||
import GF.Infra.Option(Options,noOptions)
|
||||
import GF.Infra.CheckM
|
||||
import GF.Compile.Compute.Concrete2
|
||||
import GF.Compile.Compute.Concrete
|
||||
import qualified Data.Map as Map
|
||||
import qualified Data.Set as Set
|
||||
import Data.Maybe(mapMaybe,fromMaybe)
|
||||
|
||||
@@ -10,7 +10,7 @@ import GF.Grammar hiding (Env, VGen, VApp, VRecType, ppValue)
|
||||
import GF.Grammar.Lookup
|
||||
import GF.Grammar.Predef
|
||||
import GF.Grammar.Lockfield
|
||||
import GF.Compile.Compute.Concrete2
|
||||
import GF.Compile.Compute.Concrete
|
||||
import GF.Infra.CheckM
|
||||
import GF.Data.ErrM ( Err(Ok, Bad) )
|
||||
import Control.Applicative(Applicative(..),(<|>))
|
||||
|
||||
@@ -14,8 +14,7 @@ import GF.Command.Abstract
|
||||
import GF.Command.Parse(readCommandLine,pCommand,readTransactionCommand)
|
||||
import GF.Compile.Rename(renameSourceTerm)
|
||||
import GF.Compile.TypeCheck.Concrete(inferLType)
|
||||
import qualified GF.Compile.Compute.Concrete as O(normalForm,stdPredef,Globals(..))
|
||||
import GF.Compile.Compute.Concrete2(stdPredef,Globals(..))
|
||||
import GF.Compile.Compute.Concrete(stdPredef,normalForm,Globals(..))
|
||||
import GF.Compile.GeneratePMCFG(pmcfgForm,type2fields)
|
||||
import GF.Data.Operations (Err(..))
|
||||
import GF.Data.Utilities(whenM,repeatM)
|
||||
@@ -316,18 +315,18 @@ transactionCommand (CreateLin opts f mb_t is_alter) pgf mb_txnid = do
|
||||
hypos
|
||||
|
||||
compileLinTerm sgr mo f mb_t ty = do
|
||||
let g = Gl sgr (stdPredef g)
|
||||
(t,ty) <- case mb_t of
|
||||
Just t -> do t <- renameSourceTerm sgr mo (Typed t ty)
|
||||
let g = Gl sgr (stdPredef g)
|
||||
|
||||
(t,ty) <- inferLType g t
|
||||
return (t,ty)
|
||||
Nothing -> case lookupResDef sgr (mo,identS f) of
|
||||
Ok t -> do ty <- renameSourceTerm sgr mo ty
|
||||
ty <- O.normalForm (O.Gl sgr O.stdPredef) ty
|
||||
ty <- normalForm g ty
|
||||
return (t,ty)
|
||||
Bad msg -> fail msg
|
||||
let (ctxt,res_ty) = typeFormCnc ty
|
||||
let g = Gl sgr (stdPredef g)
|
||||
rules <- pmcfgForm g t ctxt res_ty
|
||||
return (rules,type2fields sgr res_ty)
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
module GF.Term (renameSourceTerm,
|
||||
Globals(..), ConstValue(..), EvalM, stdPredef,
|
||||
Value(..), showValue, Thunk, newThunk, newEvaluatedThunk,
|
||||
evalError, evalWarn,
|
||||
inferLType, inferLType', checkLType, checkLType',
|
||||
normalForm, normalFlatForm, normalStringForm,
|
||||
unsafeIOToEvalM, force
|
||||
) where
|
||||
|
||||
import GF.Compile.Rename
|
||||
import GF.Compile.Compute.Concrete
|
||||
import GF.Compile.TypeCheck.Concrete
|
||||
@@ -76,7 +76,6 @@ library
|
||||
GF.Interactive
|
||||
GF.Compiler
|
||||
GF.Grammar
|
||||
GF.Term
|
||||
GF.Compile
|
||||
GF.CompileInParallel
|
||||
GF.Data.ErrM
|
||||
@@ -106,7 +105,6 @@ library
|
||||
GF.Compile.CFGtoPGF
|
||||
GF.Compile.CheckGrammar
|
||||
GF.Compile.Compute.Concrete
|
||||
GF.Compile.Compute.Concrete2
|
||||
GF.Compile.ExampleBased
|
||||
GF.Compile.Export
|
||||
GF.Compile.GenerateBC
|
||||
|
||||
Reference in New Issue
Block a user