diff options
| author | Mirek Kratochvil <exa.exa@gmail.com> | 2023-02-08 21:30:20 +0100 |
|---|---|---|
| committer | Mirek Kratochvil <exa.exa@gmail.com> | 2023-02-08 21:30:20 +0100 |
| commit | 4aa8b6d129382960302ea185e98c367240a01f41 (patch) | |
| tree | b21f04b127eea270da14b85c3d91c6e40ff5504c | |
| parent | de739194d400cb9f4e0c713f9251aaa251849a13 (diff) | |
| download | prlg-4aa8b6d129382960302ea185e98c367240a01f41.tar.gz prlg-4aa8b6d129382960302ea185e98c367240a01f41.tar.bz2 | |
error errs
| -rw-r--r-- | app/Interpreter.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/Interpreter.hs b/app/Interpreter.hs index 1ef39f9..f36ef0b 100644 --- a/app/Interpreter.hs +++ b/app/Interpreter.hs @@ -22,7 +22,7 @@ import Env (PrlgEnv) --import Data.Function import qualified Data.Map as M -import IR (Id(..)) +import IR (Id(..), StrTable(..)) prove :: Code -> PrlgEnv (Either String Bool) prove g = do @@ -74,7 +74,10 @@ proveStep = St.get >>= go d <- St.gets defs case d M.!? fn of Just d -> cont d - _ -> ifail $ "no definition: " ++ show fn + _ -> do + StrTable _ _ itos <- St.gets strtable + ifail $ + "no definition: " ++ (itos M.! str fn) ++ "/" ++ show (arity fn) {- Unification -} go i@Interp {cur = cur@Cho {hed = U h:hs, gol = U g:gs, heap = heap}} = unify h g |
