diff options
| author | Mirek Kratochvil <exa.exa@gmail.com> | 2022-11-12 23:25:50 +0100 |
|---|---|---|
| committer | Mirek Kratochvil <exa.exa@gmail.com> | 2022-11-12 23:25:50 +0100 |
| commit | 9d7868431792dcd94ec71adb9f95f55ab4bf027d (patch) | |
| tree | d5a9a371920edab2d7ddd00a6f87c8809dfb3221 /app/Frontend.hs | |
| parent | e248226f442f289f3b7399411cdfd127a0de4d1a (diff) | |
| download | prlg-9d7868431792dcd94ec71adb9f95f55ab4bf027d.tar.gz prlg-9d7868431792dcd94ec71adb9f95f55ab4bf027d.tar.bz2 | |
reorg 1
Diffstat (limited to 'app/Frontend.hs')
| -rw-r--r-- | app/Frontend.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Frontend.hs b/app/Frontend.hs index 1adf39b..0677889 100644 --- a/app/Frontend.hs +++ b/app/Frontend.hs @@ -1,7 +1,7 @@ module Frontend where import Builtins -import qualified Code +import Code (Interp(..)) import qualified Compiler as C import Control.Monad.IO.Class import Control.Monad.Trans.Class @@ -53,11 +53,11 @@ interpret = (>> return True) . lex compile prlgv compile prlgv = do commaId <- findStruct "," 2 + -- TODO cut let code = C.seqGoals $ C.compileGoals commaId prlgv execute code execute code = do - ds <- gets defs - let (_, res) = I.prove code ds + res <- I.prove code case res of Left err -> liftIO $ putStrLn err Right res -> @@ -87,4 +87,4 @@ interpreter :: InputT IO () interpreter = evalStateT interpreterStart - (PrlgState {defs = M.empty, ops = [], strtable = IR.emptystrtable}) + (Interp {defs = M.empty, ops = [], strtable = IR.emptystrtable, cur=error "no cur", cho=[]}) |
