diff options
| author | aarne <unknown> | 2005-02-18 15:30:05 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2005-02-18 15:30:05 +0000 |
| commit | 1c4f025320900897ae3acdab6982f7d595b98dd1 (patch) | |
| tree | 2aead25928912026a491d837bc11838caae2ca9e /src/GF/Compile | |
| parent | 75b03fb624af33c9b90c3f3dccacadf18b442d17 (diff) | |
error msg in update
Diffstat (limited to 'src/GF/Compile')
| -rw-r--r-- | src/GF/Compile/ShellState.hs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/GF/Compile/ShellState.hs b/src/GF/Compile/ShellState.hs index abda01100..8db6aa789 100644 --- a/src/GF/Compile/ShellState.hs +++ b/src/GF/Compile/ShellState.hs @@ -139,7 +139,9 @@ updateShellState opts mcnc sh ((_,sgr,gr),rts) = do Just a -> do -- test that abstract is compatible --- unsafe exception for old? --- if True oElem showOld opts then return () else - testErr (maybe True (a==) a') ("expected abstract" +++ P.prt a) + case a' of + Nothing -> return () + Just b -> testErr (a==b) ("expected abstract" +++ P.prt a +++ "but found " +++ P.prt b) return $ Just a _ -> return a' let cgr = filterAbstracts abstr0 cgr0 @@ -185,6 +187,20 @@ prShellStateInfo sh = unlines [ "global options : " +++ prOpts (gloptions sh) ] +{- ---- should be called from IOGrammar *before* compiling +testSameAbstract :: ShellState -> Maybe Ident -> Err (Maybe Ident) +testSameAbstract sh mcnc = do + abstr0 <- case abstract sh of + Just a -> do + -- test that abstract is compatible --- unsafe exception for old? + --- if True oElem showOld opts then return () else + case a' of + Nothing -> return () + Just b -> testErr (a==b) ("expected abstract" +++ P.prt a +++ "but found " +++ P.prt b) + return $ Just a + _ -> return a' +-} + abstractName sh = maybe "(none)" P.prt (abstract sh) -- | throw away those abstracts that are not needed --- could be more aggressive |
