Idris2/tests/node/ffi001/Foreign.idr
Steve Dunham 9e84b153bd
Add %foreign_impl pragma for augmenting ffi functions (#3303)
* Add %foreign_impl pragma for augmenting ffi functions

* document how conflicting %foreign_impl are handled
2024-06-11 17:45:09 +01:00

11 lines
230 B
Idris

import Control.App
import Control.App.Console
%foreign_impl Prelude.IO.prim__fork "javascript:lambda:(proc) => { throw new Error() }"
prog : (Console es) => App es ()
prog = putStrLn "hello, world"
main : IO ()
main = run prog