2022-01-12 00:13:45 +03:00
|
|
|
||| NOTE: Please keep this file in sync with the example in docs/source/backends/custom.rst
|
|
|
|
|
2020-06-14 21:38:50 +03:00
|
|
|
module Main
|
|
|
|
|
|
|
|
import Core.Context
|
|
|
|
import Compiler.Common
|
|
|
|
import Idris.Driver
|
2022-07-18 19:30:56 +03:00
|
|
|
import Idris.Syntax
|
2020-06-14 21:38:50 +03:00
|
|
|
|
2022-07-18 19:30:56 +03:00
|
|
|
compile :
|
|
|
|
Ref Ctxt Defs ->
|
|
|
|
Ref Syn SyntaxInfo ->
|
|
|
|
(tmpDir : String) -> (execDir : String) ->
|
|
|
|
ClosedTerm -> (outfile : String) -> Core (Maybe String)
|
|
|
|
compile defs syn tmp dir term file
|
|
|
|
= do coreLift $ putStrLn "I'd rather not."
|
|
|
|
pure Nothing
|
2020-06-14 21:38:50 +03:00
|
|
|
|
2022-07-18 19:30:56 +03:00
|
|
|
execute :
|
|
|
|
Ref Ctxt Defs ->
|
|
|
|
Ref Syn SyntaxInfo ->
|
|
|
|
(execDir : String) -> ClosedTerm -> Core ()
|
|
|
|
execute defs syn dir term = do coreLift $ putStrLn "Maybe in an hour."
|
2020-06-14 21:38:50 +03:00
|
|
|
|
|
|
|
lazyCodegen : Codegen
|
2021-06-27 18:00:03 +03:00
|
|
|
lazyCodegen = MkCG compile execute Nothing Nothing
|
2020-06-14 21:38:50 +03:00
|
|
|
|
|
|
|
main : IO ()
|
2021-01-16 10:03:45 +03:00
|
|
|
main = mainWithCodegens [("lazy", lazyCodegen)]
|