diff options
| author | aarne <aarne@cs.chalmers.se> | 2007-12-06 15:50:54 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2007-12-06 15:50:54 +0000 |
| commit | bfd215aa7f79c97a5488349dc372f473950ea38d (patch) | |
| tree | 4ff9cc393490edcf7f38efe73047907ad1a38dbb /src/GF/Devel/Grammar | |
| parent | f08eb82f2beb069a0f9da2dbba4c6f09cf781e83 (diff) | |
started grammar checking with new internal format
Diffstat (limited to 'src/GF/Devel/Grammar')
| -rw-r--r-- | src/GF/Devel/Grammar/Macros.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/GF/Devel/Grammar/Macros.hs b/src/GF/Devel/Grammar/Macros.hs index 785b69902..1b4ed1448 100644 --- a/src/GF/Devel/Grammar/Macros.hs +++ b/src/GF/Devel/Grammar/Macros.hs @@ -92,11 +92,13 @@ termOpGF f g = do fm = termOpModule f termOpModule :: Monad m => (Term -> m Term) -> Module -> m Module -termOpModule f m = do - mjs <- mapMapM fj (mjments m) +termOpModule f = judgementOpModule fj where + fj = either (liftM Left . termOpJudgement f) (return . Right) + +judgementOpModule :: Monad m => (Judgement -> m Judgement) -> Module -> m Module +judgementOpModule f m = do + mjs <- mapMapM f (mjments m) return m {mjments = mjs} - where - fj = either (liftM Left . termOpJudgement f) (return . Right) termOpJudgement :: Monad m => (Term -> m Term) -> Judgement -> m Judgement termOpJudgement f j = do |
