Skip to content

Instantly share code, notes, and snippets.

@donald-pinckney
Created March 26, 2019 23:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save donald-pinckney/27413e028c6f03e3b66bc144b36341c2 to your computer and use it in GitHub Desktop.
Save donald-pinckney/27413e028c6f03e3b66bc144b36341c2 to your computer and use it in GitHub Desktop.
Idris Function Exported to JavaScript
module MyFunction
export -- This is new
hello : String -> String
hello req = "Hello: " ++ req
-- This is all new
lib : FFI_Export FFI_JS "" []
lib =
Fun hello "hello" $
End
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment