core driver
This commit is contained in:
@@ -3,12 +3,15 @@ module CoreDriver
|
||||
)
|
||||
where
|
||||
--------------------------------------------------------------------------------
|
||||
import Compiler.RLPC
|
||||
import Control.Monad
|
||||
|
||||
import Core.Lex
|
||||
import Core.Parse
|
||||
import GM
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
driver :: RLPCIO ()
|
||||
driver = undefined
|
||||
|
||||
parseProg :: RLPCOptions
|
||||
-> Text
|
||||
-> (Maybe Program', [MsgEnvelope RlpcError])
|
||||
parseProg o = lexCoreR >=> parseCoreProgR
|
||||
driver = forFiles_ $ \f ->
|
||||
withSource f (lexCoreR >=> parseCoreProgR >=> evalProgR)
|
||||
|
||||
|
||||
@@ -107,11 +107,3 @@ driver = view rlpcLanguage >>= \case
|
||||
LanguageCore -> CoreDriver.driver
|
||||
LanguageRlp -> RlpDriver.driver
|
||||
|
||||
forFiles_ :: (Monad m)
|
||||
=> (RLPCOptions -> FilePath -> RLPCT m a)
|
||||
-> RLPCT m ()
|
||||
forFiles_ k = do
|
||||
fs <- view rlpcInputFiles
|
||||
o <- ask
|
||||
forM_ fs (k o)
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
module RlpDriver
|
||||
( driver
|
||||
)
|
||||
where
|
||||
--------------------------------------------------------------------------------
|
||||
import Compiler.RLPC
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
driver :: RLPCIO ()
|
||||
driver = undefined
|
||||
|
||||
|
||||
Reference in New Issue
Block a user