ppr debug flags

ddump-parsed
This commit is contained in:
crumbtoo
2024-02-08 09:26:53 -07:00
parent 1079fc7c9b
commit 6c943af4a1
14 changed files with 244 additions and 41 deletions

View File

@@ -5,6 +5,8 @@ module CoreDriver
--------------------------------------------------------------------------------
import Compiler.RLPC
import Control.Monad
import Data.Text qualified as T
import Lens.Micro.Platform
import Core.Lex
import Core.Parse
@@ -15,3 +17,8 @@ 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