diff options
| author | hallgren <hallgren@chalmers.se> | 2013-01-28 16:12:56 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2013-01-28 16:12:56 +0000 |
| commit | 713e883ad7816f0bb0e3cb7f3cb8fc2a636c805b (patch) | |
| tree | 85f332dec1a89a3f246da80b036bbd4a171bd51f /src/compiler/GF/Compile/GrammarToPGF.hs | |
| parent | 3360cc904cf80f02884bf07bd0bfb6ff72d77974 (diff) | |
Better error message for Predef.error
+ Instead of "Internal error in ...", you now get a proper error message with
a source location and a function name.
+ Also added some missing error value propagation in the partial evaluator.
+ Also some other minor cleanup and error handling fixes.
Diffstat (limited to 'src/compiler/GF/Compile/GrammarToPGF.hs')
| -rw-r--r-- | src/compiler/GF/Compile/GrammarToPGF.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/GF/Compile/GrammarToPGF.hs b/src/compiler/GF/Compile/GrammarToPGF.hs index 6fc572fc9..cc560ca1c 100644 --- a/src/compiler/GF/Compile/GrammarToPGF.hs +++ b/src/compiler/GF/Compile/GrammarToPGF.hs @@ -22,6 +22,7 @@ import GF.Compile.GeneratePMCFG import GF.Infra.Ident import GF.Infra.Option +import GF.Infra.UseIO (IOE) import GF.Data.Operations import Data.List @@ -35,7 +36,7 @@ import Text.PrettyPrint import Control.Monad.Identity -mkCanon2pgf :: Options -> SourceGrammar -> Ident -> IO D.PGF +mkCanon2pgf :: Options -> SourceGrammar -> Ident -> IOE D.PGF mkCanon2pgf opts gr am = do (an,abs) <- mkAbstr am cncs <- mapM mkConcr (allConcretes gr am) @@ -96,7 +97,7 @@ mkCanon2pgf opts gr am = do -- we have to create the PMCFG code just before linking addMissingPMCFGs seqs [] = return (seqs,[]) addMissingPMCFGs seqs (((m,id), info):is) = do - (seqs,info) <- addPMCFG opts gr cenv am cm seqs id info + (seqs,info) <- addPMCFG opts gr cenv Nothing am cm seqs id info (seqs,is ) <- addMissingPMCFGs seqs is return (seqs, ((m,id), info) : is) |
