Idris2/tests/idris2/api001/LazyCodegen.idr
Niklas Larsson e32700cff8 Add test
It takes a long time to run, but it is basically all
the testing we need of the API, if this works it's
unlikely to be broken. It requires  a change in the build
system, so don't enable it for now.
2020-06-15 16:11:08 +02:00

19 lines
567 B
Idris

module Main
import Core.Context
import Compiler.Common
import Idris.Driver
compile : Ref Ctxt Defs -> (execDir : String) ->
ClosedTerm -> (outfile : String) -> Core (Maybe String)
compile defs dir term file = do coreLift $ putStrLn "I'd rather not."
pure $ Nothing
execute : Ref Ctxt Defs -> (execDir : String) -> ClosedTerm -> Core ()
execute defs dir term = do coreLift $ putStrLn "Maybe in an hour."
lazyCodegen : Codegen
lazyCodegen = MkCG compile execute
main : IO ()
main = mainWithCodegens [("lazy", lazyCodegen)]