From 13b03bb6dafe555b4305a502bd8f7d8ab64fe142 Mon Sep 17 00:00:00 2001 From: Alexander Altman Date: Tue, 24 Feb 2015 20:40:08 -0800 Subject: purescript 0.6.8 (new formula) Closes #37196. Signed-off-by: Mike McQuaid --- Library/Formula/purescript.rb | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Library/Formula/purescript.rb (limited to 'Library') diff --git a/Library/Formula/purescript.rb b/Library/Formula/purescript.rb new file mode 100644 index 000000000..8e52cd662 --- /dev/null +++ b/Library/Formula/purescript.rb @@ -0,0 +1,29 @@ +require "language/haskell" + +class Purescript < Formula + include Language::Haskell::Cabal + + homepage "http://www.purescript.org" + url "http://hackage.haskell.org/package/purescript-0.6.8/purescript-0.6.8.tar.gz" + sha1 "70fd4d3109d61c34c8898a30d222c4b1ad8fd7a5" + + depends_on "cabal-install" => :build + depends_on "ghc" + + def install + install_cabal_package + end + + test do + test_module_path = testpath/"Test.purs" + test_target_path = testpath/"test-module.js" + test_module_path.write <<-EOS.undent + module Test where + import Control.Monad.Eff + main :: forall e. Eff e Unit + main = return unit + EOS + system bin/"psc", test_module_path, "-o", test_target_path + assert File.exist?(test_target_path) + end +end -- cgit v1.2.3