Frege support for sbt
For sbt 0.13.6+ projects, use sbt-frege version 1.1.3
Add the Frege sbt plugin to your project:
project/plugins.sbt:
addSbtPlugin("com.earldouglas" % "sbt-frege" % "3.0.2")
Write some Frege code:
src/main/frege/example/HelloWorld.fr:
package example.HelloWorld where
main :: [String] -> IO ()
main _ = println "Hello, world!"
Build and run it:
$ sbt
> compile
> run
Hello, world!
Try it from the Frege REPL:
$ sbt
> fregeRepl
frege> import example.HelloWorld (main)
frege> main []
Hello, world!
()
fregeOptions: Seq[String]
- Extra options for fregecfregeSource: File
- Frege source directory (default
src/main/frege/)fregeTarget: File
- Frege target directory (default target/frege/)fregeCompiler: String
- Full name of the Frege compiler (default
frege.compiler.Main)fregeLibrary: ModuleID
- Frege library (fregec.jar) to use (default
Frege 3.23.288)fregeReplVersion: String
- The version of frege-repl to use
(default 1.3)fregeReplMainClass: String
- The Frege REPL main class (default
frege.repl.FregeRepl
)Though sbt-frege uses 3.24.100.1 by default, Frege REPL 1.3 depends on
Frege 3.23.288, so it takes priority when launching fregeRepl
.