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-04-30 22:39:27 +00:00
|
|
|
:tag => "v2.2.3",
|
|
|
|
:revision => "b35dbbd403137b6ed2605572c2727724573fbfd9"
|
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-05-01 01:10:02 +00:00
|
|
|
sha256 "9242d48cf126dd4ae9eb8f3d843e022d86cc89df55fb98e3c5ee4e87805f9be5" => :yosemite
|
|
|
|
sha256 "9da91e105a5e3ec090e420d56026e0c56fdf1ba37008c1d4b845652f68d66aff" => :mavericks
|
|
|
|
sha256 "5c5bf1a0e83cc800d9b32c1d976a1e96ce12b05c0bf6106e9e11ccab11b3b757" => :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"
|
|
|
|
|
|
|
|
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
|