2012-09-27 05:37:51 +00:00
|
|
|
class Frege < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Non-strict, functional programming language in the spirit of Haskell"
|
2014-07-12 16:08:39 +00:00
|
|
|
homepage "https://github.com/Frege/frege/"
|
2015-04-22 02:49:06 +00:00
|
|
|
url "https://github.com/Frege/frege/releases/download/3.22.324/frege3.22.524-gcc99d7e.jar"
|
|
|
|
version "3.22.524-gcc99d7e"
|
|
|
|
sha256 "8508f5b1f03beb69311a059e9a1684dfd0212ed1501fa96626f1e0b69363338a"
|
|
|
|
|
|
|
|
depends_on :java => "1.7+"
|
2012-09-27 05:37:51 +00:00
|
|
|
|
|
|
|
def install
|
2014-07-12 16:08:39 +00:00
|
|
|
libexec.install Dir["*"]
|
2013-08-12 23:47:40 +00:00
|
|
|
bin.write_jar_script libexec/"frege#{version}.jar", "fregec", "-Xss1m"
|
2012-09-27 05:37:51 +00:00
|
|
|
end
|
2015-04-22 02:49:06 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.fr").write <<-EOS
|
|
|
|
module Hello where
|
|
|
|
|
|
|
|
greeting friend = "Hello, " ++ friend ++ "!"
|
|
|
|
|
|
|
|
main args = do
|
|
|
|
println (greeting "World")
|
|
|
|
EOS
|
|
|
|
system bin/"fregec", "-d", testpath, "test.fr"
|
|
|
|
system "java", "-Xss1m", "-cp", "#{testpath}:#{libexec}/frege#{version}.jar", "Hello"
|
|
|
|
end
|
2012-09-27 05:37:51 +00:00
|
|
|
end
|