<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.18.6.tar.gz"
  sha256 "18160d818b4d829f3be8e44c91321ebf2a57966c12e36297b4f7fc843e1ebf9d"
  license "ISC"
  head "https://github.com/diku-dk/futhark.git"

  bottle do
    sha256 cellar: :any_skip_relocation, big_sur:  "78ff19cb1a0401b22b4cce9826e2eac73422522d12a0d020048a08cfbec90450"
    sha256 cellar: :any_skip_relocation, catalina: "9e65d0b791aa78acc70703204979d5568709902d58d41e894ef4e03c5a67d01b"
    sha256 cellar: :any_skip_relocation, mojave:   "2442eb9b0daf821cd775413a3d94a55e2e799f640fa87d32e6b6708a743a81d1"
  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"
    # Remove the `--constraint` flag at version bump
    # see https://github.com/ddssff/listlike/issues/8#issuecomment-748985462 for detail
    system "cabal", "v2-install", *std_cabal_v2_args, "--constraint=bytestring==0.10.10.1"

    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 0.19.1<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.19.1.tar.gz"
  sha256 "fc1b01e09ccec2216eff925416c5dbb09586a7fa60366984796f2826acd0f87a"
  license "ISC"
  head "https://github.com/diku-dk/futhark.git"

  bottle do
    sha256 cellar: :any_skip_relocation, big_sur:  "78ff19cb1a0401b22b4cce9826e2eac73422522d12a0d020048a08cfbec90450"
    sha256 cellar: :any_skip_relocation, catalina: "9e65d0b791aa78acc70703204979d5568709902d58d41e894ef4e03c5a67d01b"
    sha256 cellar: :any_skip_relocation, mojave:   "2442eb9b0daf821cd775413a3d94a55e2e799f640fa87d32e6b6708a743a81d1"
  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"
    # Remove the `--constraint` flag at version bump
    # see https://github.com/ddssff/listlike/issues/8#issuecomment-748985462 for detail
    system "cabal", "v2-install", *std_cabal_v2_args, "--constraint=bytestring==0.10.10.1"

    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.13238770685579196, 'fraction_numerical': 0.15096251266464034, 'mean_word_length': 4.424908424908425, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '6769404', 'n_tokens_mistral': 1497, 'n_tokens_neox': 1282, 'n_words': 203}