Skip to content

Commit

Permalink
cryptol 2.2.1 (new formula)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid committed Mar 30, 2015
1 parent e571cbb commit 51f278a
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Library/Formula/cryptol.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
require "language/haskell"

class Cryptol < Formula
include Language::Haskell::Cabal

homepage "http://www.cryptol.net/"
url "https://github.com/GaloisInc/cryptol.git",
:tag => "v2.2.1",
:revision => "300ed3cba993e49d0dbe34205d4f404524a3ffdd"
sha256 "90d2cbe35db8b2a9fcd78eaa2c08ab0cd81641a30949ab855dde71d17429d3ee"
head "https://github.com/GaloisInc/cryptol.git"

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

0 comments on commit 51f278a

Please sign in to comment.