diff options
| author | aarne <aarne@cs.chalmers.se> | 2008-02-21 08:04:43 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2008-02-21 08:04:43 +0000 |
| commit | c764a758e1a5e0eab346a2c3c88b7e8a9c64e248 (patch) | |
| tree | eb10cac5e8cf89061628362bd2f4499ce2102f94 /src/GF/Devel/Compile | |
| parent | 7412c24267238c5273099945cdbf303fc0df9cd7 (diff) | |
documenting testgf3
Diffstat (limited to 'src/GF/Devel/Compile')
| -rw-r--r-- | src/GF/Devel/Compile/CheckGrammar.hs | 6 | ||||
| -rw-r--r-- | src/GF/Devel/Compile/Compile.hs | 4 | ||||
| -rw-r--r-- | src/GF/Devel/Compile/GF.cf | 2 | ||||
| -rw-r--r-- | src/GF/Devel/Compile/SourceToGF.hs | 1 |
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 ---- |
