<commit_before>class Futhark < Formula
  desc "Data-parallel functional programming language"
  homepage "https://futhark-lang.org/"
  url "https://github.com/diku-dk/futhark/archive/v0.21.2.tar.gz"
  sha256 "347de4067bc715f9aadb47d30e70b04e462233ec26209c917b007440837cc9ba"
  license "ISC"
  head "https://github.com/diku-dk/futhark.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "6f56c2c5f84554f4b438498768dad2bbc5116b644a9395dc075b81251c0149a4"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "31e1e95734bfd8ebab6f161b7fdec432e4298a7cc726b18fa5fba2c150183454"
    sha256 cellar: :any_skip_relocation, monterey:       "95d7283b98802cb6bdbeadc3f06d65d96ff1a65c6538892e65b3edefdbb23879"
    sha256 cellar: :any_skip_relocation, big_sur:        "9edbb8c562b60e85d56fa75c681f75d8d8452739b4edaa8f4f8294f28ce3abea"
    sha256 cellar: :any_skip_relocation, catalina:       "c12481d906075e0ce7723442ead6570c412684d14dc0222e0dfdef67b6d628b2"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "e83d9587d8d5be1a58316048b0c8f0583ca1806761129c2af70d9aef1fceef4b"
  end

  depends_on "cabal-install" => :build
  depends_on "ghc" => :build
  depends_on "sphinx-doc" => :build

  uses_from_macos "ncurses"
  uses_from_macos "zlib"

  def install
    system "cabal", "v2-update"
    system "cabal", "v2-install", *std_cabal_v2_args

    system "make", "-C", "docs", "man"
    man1.install Dir["docs/_build/man/*.1"]
  end

  test do
    (testpath/"test.fut").write <<~EOS
      let main (n: i32) = reduce (*) 1 (1...n)
    EOS
    system "#{bin}/futhark", "c", "test.fut"
    assert_equal "3628800i32", pipe_output("./test", "10", 0).chomp
  end
end<commit_msg>futhark: update 0.21.2 bottle.<commit_after>class Futhark < Formula
  desc "Data-parallel functional programming language"
  homepage "https://futhark-lang.org/"
  url "https://github.com/diku-dk/futhark/archive/v0.21.2.tar.gz"
  sha256 "347de4067bc715f9aadb47d30e70b04e462233ec26209c917b007440837cc9ba"
  license "ISC"
  head "https://github.com/diku-dk/futhark.git", branch: "master"

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "3c86320052a5a170691511bc75c7fcdfc4dcd9559718dc9756029f53065461ed"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "1e99fbd100523536e1bf8e663787e0db7ec6c9a134f9526e2ec9b2a3b67a8d93"
    sha256 cellar: :any_skip_relocation, monterey:       "2a1851d82ca5a8259d397261a34b67404025fa71221271aed2e5ce82f0a8f46a"
    sha256 cellar: :any_skip_relocation, big_sur:        "17fa62c99680f2b43f93e0690c5a115486cd882b3955f5539d759d65da70497a"
    sha256 cellar: :any_skip_relocation, catalina:       "2992f1dd48fc3039d6886541262aa62dcfb0d46340b1e8f5600cee1146dc51b0"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "1c54c65338438d6dbfb5d7dd5a8a40c94a0dfae9932153e6c91bf7e778fbbe09"
  end

  depends_on "cabal-install" => :build
  depends_on "ghc" => :build
  depends_on "sphinx-doc" => :build

  uses_from_macos "ncurses"
  uses_from_macos "zlib"

  def install
    system "cabal", "v2-update"
    system "cabal", "v2-install", *std_cabal_v2_args

    system "make", "-C", "docs", "man"
    man1.install Dir["docs/_build/man/*.1"]
  end

  test do
    (testpath/"test.fut").write <<~EOS
      let main (n: i32) = reduce (*) 1 (1...n)
    EOS
    system "#{bin}/futhark", "c", "test.fut"
    assert_equal "3628800i32", pipe_output("./test", "10", 0).chomp
  end
end
{'fraction_non_alphanumeric': 0.11185551995339353, 'fraction_numerical': 0.200990387416254, 'mean_word_length': 5.035149384885765, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, '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': '3347388', 'n_tokens_mistral': 1887, 'n_tokens_neox': 1539, 'n_words': 214}