forked from idris-lang/Idris-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
Javascript Notes
Heather edited this page Apr 29, 2015
·
1 revision
To generate code that is tailored for running in the browser issue the following command:
$ idris --codegen javascript hello.idr -o hello.js
Generating code for NodeJS is slightly different. Idris outputs a JavaScript file that can be directly executed via node.
$ idris --codegen node hello.idr -o hello
$ ./hello
Hello world
IDRIS can produce very big chunks of JavaScript code (hello world weighs in at 1500 lines). However, the generated code can be minified using the closure-compiler from Google.
java -jar compiler.jar --compilation_level ADVANCED_OPTIMIZATIONS --js hello.js
New Foreign Function Interface
Tool Support
Community
- Mini Projects, for those interested in contributing
- Libraries, available elsewhere
- Idris Developer Meetings
- Tutorial: Type Providers and Foreign Functions
- The Zen of Idris
- Profiling
Feature proposals ("dragon eggs")