aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/purescript.rb
diff options
context:
space:
mode:
authorAlexander Altman2015-02-24 20:40:08 -0800
committerMike McQuaid2015-02-28 18:13:12 +0000
commit13b03bb6dafe555b4305a502bd8f7d8ab64fe142 (patch)
treefb5bdccb416474b0b04e94e84d03322296de46c6 /Library/Formula/purescript.rb
parent1473f6ca4e9da774d6ada6944ee7d26951ac5666 (diff)
downloadhomebrew-13b03bb6dafe555b4305a502bd8f7d8ab64fe142.tar.bz2
purescript 0.6.8 (new formula)
Closes #37196. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula/purescript.rb')
-rw-r--r--Library/Formula/purescript.rb29
1 files changed, 29 insertions, 0 deletions
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