2018-02-14 17:40:45 +00:00
|
|
|
class Futhark < Formula
|
|
|
|
desc "Data-parallel functional programming language"
|
|
|
|
homepage "https://futhark-lang.org/"
|
|
|
|
url "https://github.com/diku-dk/futhark/archive/v0.3.1.tar.gz"
|
|
|
|
sha256 "a3e8ab25dc53160da5e4bef58fe91107909ade6f93523227a935c5330d3ea8f7"
|
2018-02-15 17:34:45 +00:00
|
|
|
revision 1
|
2018-02-14 17:40:45 +00:00
|
|
|
|
2018-02-14 19:18:13 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any_skip_relocation
|
2018-02-15 18:18:47 +00:00
|
|
|
sha256 "7eae369141986e4700ecb0eaef9bdf8023662b9536146750166bb73d5ccdc072" => :high_sierra
|
|
|
|
sha256 "7c737eb7d6f4b47989c267981c0e027cd4d6803cf3d090e80b4628f02ccdced8" => :sierra
|
|
|
|
sha256 "4f756fc94617e0902349587670bfce54bd497116bf16b44a3a5c3c34e23871d4" => :el_capitan
|
2018-02-14 19:18:13 +00:00
|
|
|
end
|
|
|
|
|
2018-03-20 19:49:13 +00:00
|
|
|
depends_on "ghc@8.2" => :build
|
2018-02-14 17:40:45 +00:00
|
|
|
depends_on "haskell-stack" => :build
|
|
|
|
depends_on "sphinx-doc" => :build
|
|
|
|
|
|
|
|
def install
|
2018-03-20 19:49:13 +00:00
|
|
|
system "stack", "-j#{ENV.make_jobs}", "--system-ghc", "--no-install-ghc",
|
2018-02-15 17:34:45 +00:00
|
|
|
"--local-bin-path=#{bin}", "install"
|
2018-02-14 17:40:45 +00:00
|
|
|
|
|
|
|
system "make", "-C", "docs", "man"
|
|
|
|
man1.install Dir["docs/_build/man/*.1"]
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"test.fut").write <<~EOS
|
|
|
|
let main (n: i32) = reduce (*) 1 (1...n)
|
|
|
|
EOS
|
|
|
|
system "#{bin}/futhark-c", "test.fut"
|
2018-02-15 17:34:45 +00:00
|
|
|
assert_equal "3628800i32", pipe_output("./test", "10", 0).chomp
|
2018-02-14 17:40:45 +00:00
|
|
|
end
|
|
|
|
end
|