2015-03-30 07:37:25 +00:00
|
|
|
require "language/haskell"
|
|
|
|
|
|
|
|
class Cryptol < Formula
|
|
|
|
include Language::Haskell::Cabal
|
|
|
|
|
|
|
|
homepage "http://www.cryptol.net/"
|
|
|
|
url "https://github.com/GaloisInc/cryptol.git",
|
2015-06-02 18:00:20 +00:00
|
|
|
:tag => "v2.2.4",
|
|
|
|
:revision => "ebaa98699bfc704c5ac5a100e2829e68f3a11d9b"
|
2015-03-30 07:37:25 +00:00
|
|
|
head "https://github.com/GaloisInc/cryptol.git"
|
|
|
|
|
2015-03-27 09:47:04 +00:00
|
|
|
bottle do
|
2015-06-02 21:27:20 +00:00
|
|
|
sha256 "68e7672e7481772a3fc758682d76f55480ea9d125b889c011340f9165ff0cf76" => :yosemite
|
|
|
|
sha256 "d5f1fa017614729c6c849bda23d568689c17d782e1f2157254795c3486affe57" => :mavericks
|
|
|
|
sha256 "eeae281e614864184053d9814c75ccf796dd79303f0281234bf4cda85cfbe996" => :mountain_lion
|
2015-03-27 09:47:04 +00:00
|
|
|
end
|
|
|
|
|
2015-03-30 07:37:25 +00:00
|
|
|
depends_on "ghc" => :build
|
|
|
|
depends_on "cabal-install" => :build
|
|
|
|
depends_on "cvc4"
|
|
|
|
|
2015-05-29 02:30:10 +00:00
|
|
|
setup_ghc_compilers
|
|
|
|
|
2015-03-30 07:37:25 +00:00
|
|
|
def install
|
|
|
|
cabal_sandbox do
|
|
|
|
system "make", "PREFIX=#{prefix}", "install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"hello.icry").write <<-EOS.undent
|
|
|
|
:prove \\(x : [8]) -> x == x
|
|
|
|
:prove \\(x : [32]) -> x + zero == x
|
|
|
|
EOS
|
|
|
|
result = shell_output "#{bin}/cryptol -b #{(testpath/"hello.icry")}"
|
|
|
|
expected = <<-EOS.undent
|
|
|
|
Loading module Cryptol
|
|
|
|
Q.E.D.
|
|
|
|
Q.E.D.
|
|
|
|
EOS
|
|
|
|
assert_match expected, result
|
|
|
|
end
|
|
|
|
end
|