Created
April 1, 2016 12:29
-
-
Save milessabin/98a920053907d1b13a80c928753f45e1 to your computer and use it in GitHub Desktop.
shapeless on the Ammonite REPL with no dependencies other than an installed JDK. Many thanks to @przemekpokrywka for the idea, @alxarchambault for Coursier and @li_haoyi for Ammonite.
This file contains hidden or 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
miles@frege:~$ ./shapeless.sh | |
Loading... | |
Welcome to the Ammonite Repl 0.5.2 | |
(Scala 2.11.7 Java 1.8.0_51) | |
@ val l = 23 :: "foo" :: true :: HNil | |
l: Int :: String :: Boolean :: HNil = ::(23, ::("foo", ::(true, HNil))) | |
@ |
This file contains hidden or 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
#!/bin/bash | |
test -e ~/.coursier/cr || (mkdir -p ~/.coursier && wget -q -O ~/.coursier/cr https://git.io/vgvpD && chmod +x ~/.coursier/cr) | |
CLASSPATH="$(~/.coursier/cr fetch -q -p \ | |
\ | |
com.chuusai:shapeless_2.11:2.3.0 \ | |
com.lihaoyi:ammonite-repl_2.11.7:0.5.2 \ | |
\ | |
)" java ammonite.repl.Main --predef 'import shapeless._' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment