diff options
Diffstat (limited to 'app/Load.hs')
| -rw-r--r-- | app/Load.hs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/app/Load.hs b/app/Load.hs index 5a482fd..440c160 100644 --- a/app/Load.hs +++ b/app/Load.hs @@ -31,16 +31,13 @@ intern :: P.PrlgStr -> PrlgEnv IR.PrlgInt intern prlgs = do prlgi <- withStrTable $ \st -> IR.internPrlg st prlgs underscore <- findAtom "_" - list <- findAtom "[]" withStrTable $ \st -> (st, C.squashVars $ C.variablizePrlg underscore st prlgi) -compile :: IR.PrlgInt -> PrlgEnv Code +compile :: IR.PrlgInt -> ExceptT String PrlgEnv Code compile prlgv = do - comma <- findAtom "," - semi <- findAtom ";" - cut <- findAtom "!" - return $ C.compileGoals comma semi cut prlgv + [comma, semi, cut] <- lift $ traverse findAtom [",", ";", "!"] + except $ C.compileGoals comma semi cut prlgv expansion :: (Int -> IR.PrlgInt -> IR.PrlgInt) |
