Created
May 12, 2020 06:10
-
-
Save mokshasoft/e0d3b39b2be5bbd766d93605a4d7e48d to your computer and use it in GitHub Desktop.
Idris Gambit CG: Can't pass argument of type %World to foreign function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%foreign "C:applyFn,libsome" | |
prim_applyFnIO : (PrimIO ()) -> PrimIO () | |
applyFnIO : (IO ()) -> IO () | |
applyFnIO f = primIO $ prim_applyFnIO (toPrim f) | |
main : IO () | |
main = applyFnIO $ putStrLn "hello" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bug: nobug1-check bug1-check nobug1 bug1 | |
bug1-check: | |
idris2 -c --cg chez Bug1.idr | |
idris2 -c --cg gambit Bug1.idr | |
nobug1-check: | |
idris2 -c --cg chez NoBug1.idr | |
idris2 -c --cg gambit NoBug1.idr | |
bug1: | |
idris2 --cg chez Bug1.idr -o c_bug1 | |
idris2 --cg gambit Bug1.idr -o g_bug1 | |
nobug1: | |
idris2 -c --cg chez NoBug1.idr -o c_nobug1 | |
idris2 -c --cg gambit NoBug1.idr -o g_nobug1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%foreign "C:applyFn,libsome" | |
prim_applyFnIO : (String -> PrimIO ()) -> PrimIO () | |
applyFnIO : (String -> IO ()) -> IO () | |
applyFnIO f = primIO $ prim_applyFnIO (\str => toPrim $ f str) | |
main : IO () | |
main = applyFnIO $ putStrLn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment