Created
February 1, 2014 23:40
-
-
Save dysinger/8760823 to your computer and use it in GitHub Desktop.
Idris -> Java Hello World in 6 lines
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
$ cabal sandbox init | |
$ cabal install idris | |
$ echo 'main : IO () ; main = print "hello"' >hello.idr | |
$ ./.cabal-sandbox/bin/idris --mvn --codegen Java -o hello hello.idr | |
$ cd hello | |
$ mvn -DmainClass=hello package shade:shade | |
$ java -jar target/hello.jar | |
"hello" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why the round trip through --mvn? As opposed to leaving off that flag, and lines 5 & 6. Also, it produces self-executably jars - just ./hello should work.