codegen for functions.

- I think next is slightly messed up (wrong indent on first line)
- dcon need code
This commit is contained in:
2024-08-08 22:59:07 -07:00
parent 13dd77345c
commit 449b6762a6
3 changed files with 117 additions and 18 deletions

View File

@@ -9,6 +9,7 @@ import Data.String
import Data.Vect
import Data.IORef
-- import Lib.Check
import Lib.Compile
import Lib.Parser
-- import Lib.Parser.Impl
import Lib.Prettier
@@ -46,6 +47,11 @@ dumpContext top = do
go [] = pure ()
go (x :: xs) = go xs >> putStrLn " \{show x}"
dumpSource : M ()
dumpSource = do
doc <- compile
putStrLn $ render 80 doc
processFile : String -> M ()
processFile fn = do
putStrLn "*** Process \{fn}"
@@ -60,6 +66,7 @@ processFile fn = do
| Left y => putStrLn (showError src y)
dumpContext !get
dumpSource
main' : M ()
main' = do