summaryrefslogtreecommitdiff
path: root/app/Env.hs
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2022-12-14 19:47:41 +0100
committerMirek Kratochvil <exa.exa@gmail.com>2022-12-14 19:47:41 +0100
commit60ff47250b5064c38b8f4889766696cb4a5683b0 (patch)
treeeddd52364cd1b2fbfd7219061a5ed5b9c846711e /app/Env.hs
parent32f6fe0291e289c88d29710e42da3e6aca47a3fa (diff)
downloadprlg-60ff47250b5064c38b8f4889766696cb4a5683b0.tar.gz
prlg-60ff47250b5064c38b8f4889766696cb4a5683b0.tar.bz2
slight cleanup, metacall
Diffstat (limited to 'app/Env.hs')
-rw-r--r--app/Env.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/Env.hs b/app/Env.hs
index e873711..82bf9d0 100644
--- a/app/Env.hs
+++ b/app/Env.hs
@@ -1,6 +1,6 @@
module Env where
-import Code (Interp(..), PrlgEnv)
+import Code (Interp(..), InterpFn, PrlgEnv)
import Control.Monad.Trans.State.Lazy (gets, modify)
import qualified IR
@@ -20,3 +20,6 @@ findAtom :: String -> Env.PrlgEnv Int
findAtom = withStrTable . flip IR.strtablize
type PrlgEnv a = Code.PrlgEnv a
+
+prlgError :: String -> InterpFn
+prlgError = pure . pure . Left