error errs
This commit is contained in:
		
							parent
							
								
									de739194d4
								
							
						
					
					
						commit
						4aa8b6d129
					
				|  | @ -22,7 +22,7 @@ import Env (PrlgEnv) | ||||||
| 
 | 
 | ||||||
| --import Data.Function | --import Data.Function | ||||||
| import qualified Data.Map as M | import qualified Data.Map as M | ||||||
| import IR (Id(..)) | import IR (Id(..), StrTable(..)) | ||||||
| 
 | 
 | ||||||
| prove :: Code -> PrlgEnv (Either String Bool) | prove :: Code -> PrlgEnv (Either String Bool) | ||||||
| prove g = do | prove g = do | ||||||
|  | @ -74,7 +74,10 @@ proveStep = St.get >>= go | ||||||
|       d <- St.gets defs |       d <- St.gets defs | ||||||
|       case d M.!? fn of |       case d M.!? fn of | ||||||
|         Just d -> cont d |         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 -} |     {- Unification -} | ||||||
|     go i@Interp {cur = cur@Cho {hed = U h:hs, gol = U g:gs, heap = heap}} = |     go i@Interp {cur = cur@Cho {hed = U h:hs, gol = U g:gs, heap = heap}} = | ||||||
|       unify h g |       unify h g | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue