<commit_before>require "language/haskell"

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

  desc "Domain-specific language for specifying cryptographic algorithms"
  homepage "http://www.cryptol.net/"
  url "https://github.com/GaloisInc/cryptol.git",
      :tag => "v2.2.6",
      :revision => "22fa2f0538f8c6c60f32735f54fe9877f56e1cba"
  head "https://github.com/GaloisInc/cryptol.git"

  bottle do
    sha256 "58595e61bb8681a1871668217a3462db76a84f7a437b58014fa1589ba3863b06" => :el_capitan
    sha256 "2c3f5331ff9c08ee17307c48dabd23bc7768388901789973e0054a4890981bb6" => :yosemite
    sha256 "5af2fca89194f8b0be00311d96990a7e99ed725983631a08777ad28d2163020f" => :mavericks
  end

  depends_on "ghc" => :build
  depends_on "cabal-install" => :build
  depends_on "z3"

  setup_ghc_compilers

  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
<commit_msg>cryptol: simplify formula<commit_after>require "language/haskell"

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

  desc "Domain-specific language for specifying cryptographic algorithms"
  homepage "http://www.cryptol.net/"
  url "https://github.com/GaloisInc/cryptol.git",
      :tag => "v2.2.6",
      :revision => "22fa2f0538f8c6c60f32735f54fe9877f56e1cba"
  head "https://github.com/GaloisInc/cryptol.git"

  bottle do
    sha256 "58595e61bb8681a1871668217a3462db76a84f7a437b58014fa1589ba3863b06" => :el_capitan
    sha256 "2c3f5331ff9c08ee17307c48dabd23bc7768388901789973e0054a4890981bb6" => :yosemite
    sha256 "5af2fca89194f8b0be00311d96990a7e99ed725983631a08777ad28d2163020f" => :mavericks
  end

  depends_on "ghc" => :build
  depends_on "cabal-install" => :build
  depends_on "z3"

  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

{'fraction_non_alphanumeric': 0.12593762337149625, 'fraction_numerical': 0.1421239636794315, 'mean_word_length': 3.5330948121645798, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 21, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2729175', 'n_tokens_mistral': 1239, 'n_tokens_neox': 1025, 'n_words': 179}