ugh
This commit is contained in:
24
app.old/CoreDriver.hs
Normal file
24
app.old/CoreDriver.hs
Normal file
@@ -0,0 +1,24 @@
|
||||
module CoreDriver
|
||||
( driver
|
||||
)
|
||||
where
|
||||
--------------------------------------------------------------------------------
|
||||
import Compiler.RLPC
|
||||
import Control.Monad
|
||||
import Data.Text qualified as T
|
||||
import Control.Lens.Combinators
|
||||
|
||||
import Core.Lex
|
||||
import Core.Parse
|
||||
import GM
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
driver :: RLPCIO ()
|
||||
driver = forFiles_ $ \f ->
|
||||
withSource f (lexCoreR >=> parseCoreProgR >=> evalProgR)
|
||||
|
||||
driverSource :: T.Text -> RLPCIO ()
|
||||
driverSource = lexCoreR >=> parseCoreProgR >=> evalProgR >=> printRes
|
||||
where
|
||||
printRes = liftIO . print . view _1
|
||||
|
||||
Reference in New Issue
Block a user