<commit_before>require "formula"
require "language/haskell"

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

  homepage "http://johnmacfarlane.net/pandoc/"
  url "https://hackage.haskell.org/package/pandoc-1.13.1/pandoc-1.13.1.tar.gz"
  sha1 "8f3df1977cf9daa848640754515b733c13fd934a"

  bottle do
    sha1 "cb797a12020892b2eee7131d448692309b184d99" => :mavericks
    sha1 "0795ad1fdea3a1d47219753ebce5d34f7311ad5b" => :mountain_lion
    sha1 "c9c2e4e7e74b4850bcbba148d8efc6af7da47605" => :lion
  end

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

  fails_with :clang if MacOS.version < :mavericks # Same as ghc.rb

  def install
    cabal_sandbox do
      cabal_install "--only-dependencies"
      cabal_install "--prefix=#{prefix}"
    end
    cabal_clean_lib
  end

  test do
    system "pandoc", "-o", "output.html", prefix/"README"
    assert (Pathname.pwd/"output.html").read.include? '<h1 id="synopsis">Synopsis</h1>'
  end
end<commit_msg>pandoc: allow clang on 10.8<commit_after>require "formula"
require "language/haskell"

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

  homepage "http://johnmacfarlane.net/pandoc/"
  url "https://hackage.haskell.org/package/pandoc-1.13.1/pandoc-1.13.1.tar.gz"
  sha1 "8f3df1977cf9daa848640754515b733c13fd934a"

  bottle do
    sha1 "cb797a12020892b2eee7131d448692309b184d99" => :mavericks
    sha1 "0795ad1fdea3a1d47219753ebce5d34f7311ad5b" => :mountain_lion
    sha1 "c9c2e4e7e74b4850bcbba148d8efc6af7da47605" => :lion
  end

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

  fails_with(:clang) { build 425 } # clang segfaults on Lion

  def install
    cabal_sandbox do
      cabal_install "--only-dependencies"
      cabal_install "--prefix=#{prefix}"
    end
    cabal_clean_lib
  end

  test do
    system "pandoc", "-o", "output.html", prefix/"README"
    assert (Pathname.pwd/"output.html").read.include? '<h1 id="synopsis">Synopsis</h1>'
  end
end
{'fraction_non_alphanumeric': 0.1226321036889332, 'fraction_numerical': 0.11764705882352941, 'mean_word_length': 4.199481865284974, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 17, 'https://': 2, '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': '4118069', 'n_tokens_mistral': 967, 'n_tokens_neox': 848, 'n_words': 136}