diff options
Diffstat (limited to 'src/GF/Devel/Grammar/Construct.hs')
| -rw-r--r-- | src/GF/Devel/Grammar/Construct.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/GF/Devel/Grammar/Construct.hs b/src/GF/Devel/Grammar/Construct.hs index bc966fcf6..6d77c1c31 100644 --- a/src/GF/Devel/Grammar/Construct.hs +++ b/src/GF/Devel/Grammar/Construct.hs @@ -149,7 +149,11 @@ unifyJudgement old new = do ---- (unwords ["illegal update of",prt oterm,"to",prt nterm]) return nterm - +updateJudgement :: Ident -> Ident -> Judgement -> GF -> Err GF +updateJudgement m c ju gf = do + mo <- maybe (Bad (show m)) return $ Data.Map.lookup m $ gfmodules gf + let mo' = mo {mjments = insert c ju (mjments mo)} + return $ gf {gfmodules = insert m mo' (gfmodules gf)} -- abstractions on Term |
