summaryrefslogtreecommitdiff
path: root/src/GF/UseGrammar/Editing.hs
diff options
context:
space:
mode:
authoraarne <unknown>2005-03-02 13:25:45 +0000
committeraarne <unknown>2005-03-02 13:25:45 +0000
commit48deedea143d55fec973a3749c78d46921dfd3f7 (patch)
tree91ede10b4da420078be956a26348d37bc9aeb8b6 /src/GF/UseGrammar/Editing.hs
parent7b08eb7ffd5e82a793fe47cf764b1ce2f4d3a0ee (diff)
fixed shell solve command
Diffstat (limited to 'src/GF/UseGrammar/Editing.hs')
-rw-r--r--src/GF/UseGrammar/Editing.hs13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/GF/UseGrammar/Editing.hs b/src/GF/UseGrammar/Editing.hs
index b9ccb6691..a816d85ef 100644
--- a/src/GF/UseGrammar/Editing.hs
+++ b/src/GF/UseGrammar/Editing.hs
@@ -5,9 +5,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/03/02 09:43:52 $
+-- > CVS $Date: 2005/03/02 14:25:45 $
-- > CVS $Author: aarne $
--- > CVS $Revision: 1.12 $
+-- > CVS $Revision: 1.13 $
--
-- generic tree editing, with some grammar notions assumed. AR 18\/8\/2001.
-- 19\/6\/2003 for GFC
@@ -362,9 +362,12 @@ reCheckState gr st = annotate gr (tree2exp (loc2tree st)) >>= return . tree2loc
reCheckStateReject :: CGrammar -> State -> Err State
reCheckStateReject gr st = do
st' <- reCheckState gr st
- case (constrsNode $ nodeTree $ actTree st') of
- [] -> return st'
- cs -> Bad $ "Unsolvable constraints:" +++ prConstraints cs
+ rejectUnsolvable st'
+
+rejectUnsolvable :: State -> Err State
+rejectUnsolvable st = case (constrsNode $ nodeTree $ actTree st) of
+ [] -> return st
+ cs -> Bad $ "Unsolvable constraints:" +++ prConstraints cs
-- | extract metasubstitutions from constraints and solve them
solveAll :: CGrammar -> State -> Err State