diff options
| author | aarne <aarne@cs.chalmers.se> | 2007-12-09 15:20:50 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2007-12-09 15:20:50 +0000 |
| commit | 6edb2f075a5be472fbdf01946a2cba2c17059b49 (patch) | |
| tree | 1e4116165962f04b5433613622b88a01026c9ccc /src/GF/Devel/Grammar | |
| parent | 6a4218e9efebc8b037cf2410a5e07a3fb20a5069 (diff) | |
debugging new compilation
Diffstat (limited to 'src/GF/Devel/Grammar')
| -rw-r--r-- | src/GF/Devel/Grammar/Compute.hs | 2 | ||||
| -rw-r--r-- | src/GF/Devel/Grammar/Construct.hs | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/GF/Devel/Grammar/Compute.hs b/src/GF/Devel/Grammar/Compute.hs index 449cd3b90..6835fdbe1 100644 --- a/src/GF/Devel/Grammar/Compute.hs +++ b/src/GF/Devel/Grammar/Compute.hs @@ -63,7 +63,7 @@ computeTermOpt rec gr = comp where ---- Computed t' -> return $ unComputed t' Vr x -> do - t' <- maybe (prtBad ("no value given to variable") x) return $ lookup x g + t' <- maybe (prtBad ("no value for variable") x) return $ lookup x g case t' of _ | t == t' -> return t _ -> comp g t' 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 |
