summaryrefslogtreecommitdiff
path: root/src/GF/Devel/Compile
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2008-02-21 08:04:43 +0000
committeraarne <aarne@cs.chalmers.se>2008-02-21 08:04:43 +0000
commitc764a758e1a5e0eab346a2c3c88b7e8a9c64e248 (patch)
treeeb10cac5e8cf89061628362bd2f4499ce2102f94 /src/GF/Devel/Compile
parent7412c24267238c5273099945cdbf303fc0df9cd7 (diff)
documenting testgf3
Diffstat (limited to 'src/GF/Devel/Compile')
-rw-r--r--src/GF/Devel/Compile/CheckGrammar.hs6
-rw-r--r--src/GF/Devel/Compile/Compile.hs4
-rw-r--r--src/GF/Devel/Compile/GF.cf2
-rw-r--r--src/GF/Devel/Compile/SourceToGF.hs1
4 files changed, 6 insertions, 7 deletions
diff --git a/src/GF/Devel/Compile/CheckGrammar.hs b/src/GF/Devel/Compile/CheckGrammar.hs
index 5038c5168..831d0b9b2 100644
--- a/src/GF/Devel/Compile/CheckGrammar.hs
+++ b/src/GF/Devel/Compile/CheckGrammar.hs
@@ -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
diff --git a/src/GF/Devel/Compile/Compile.hs b/src/GF/Devel/Compile/Compile.hs
index 6edb64703..b636f0fa7 100644
--- a/src/GF/Devel/Compile/Compile.hs
+++ b/src/GF/Devel/Compile/Compile.hs
@@ -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
diff --git a/src/GF/Devel/Compile/GF.cf b/src/GF/Devel/Compile/GF.cf
index a0ce1ebb7..3edbdf347 100644
--- a/src/GF/Devel/Compile/GF.cf
+++ b/src/GF/Devel/Compile/GF.cf
@@ -13,7 +13,7 @@ comment "{-" "-}" ;
-- identifiers
-position token PIdent ('_')? letter (letter | digit | '_' | '\'')* ;
+position token PIdent ('_' | letter) (letter | digit | '_' | '\'')* ;
-- the top-level grammar
diff --git a/src/GF/Devel/Compile/SourceToGF.hs b/src/GF/Devel/Compile/SourceToGF.hs
index f501fd609..64455f907 100644
--- a/src/GF/Devel/Compile/SourceToGF.hs
+++ b/src/GF/Devel/Compile/SourceToGF.hs
@@ -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 ----