1
0
forked from GitHub/gf-core

documenting testgf3

This commit is contained in:
aarne
2008-02-21 08:04:43 +00:00
parent 7412c24267
commit c764a758e1
8 changed files with 390 additions and 9 deletions

View File

@@ -429,10 +429,8 @@ inferLType gr trm = case trm of
QC m ident -> checks [
termWith trm $ checkErr (lookupOperType gr m ident) >>= comp
,
checkErr (lookupOperDef gr m ident) >>= infer
,
prtFail "cannot infer type of canonical constant" trm
-- ,checkErr (lookupOperDef gr m ident) >>= infer
-- ,prtFail "cannot infer type of canonical constant" trm
]
Val ty i -> termWith trm $ return ty

View File

@@ -14,7 +14,7 @@ import GF.Devel.Grammar.Construct
import GF.Infra.Ident
import GF.Devel.Grammar.PrGF
----import GF.Devel.Grammar.Lookup
import GF.Devel.ReadFiles
import GF.Devel.Infra.ReadFiles
import GF.Infra.Option ----
import GF.Data.Operations
@@ -102,7 +102,7 @@ compileOne opts env@(_,srcgr) file = do
-- for compiled gf, read the file and update environment
-- also undo common subexp optimization, to enable normal computations
"gfo" -> do
"gfn" -> do
sm0 <- putp ("+ reading" +++ file) $ getSourceModule opts file
let sm1 = unsubexpModule sm0
sm <- {- putp "creating indirections" $ -} ioeErr $ extendModule srcgr sm1

View File

@@ -13,7 +13,7 @@ comment "{-" "-}" ;
-- identifiers
position token PIdent ('_')? letter (letter | digit | '_' | '\'')* ;
position token PIdent ('_' | letter) (letter | digit | '_' | '\'')* ;
-- the top-level grammar

View File

@@ -444,6 +444,7 @@ transExp x = case x of
---- ELin id -> liftM G.LiT $ transIdent id
EEqs eqs -> liftM G.Eqs $ mapM transEquation eqs
EData -> return G.EData
_ -> Bad $ "translation not yet defined for" +++ printTree x ----