<commit_before>module Main where

import Test.DocTest
import System.Directory
import System.FilePath
import Control.Applicative
import Control.Monad
import Data.List

main :: IO ()
main = getSources >>= \sources -> doctest $
    "-isrc"
  : "-idist/build/autogen"
  : "-optP-include"
  : "-optPdist/build/autogen/cabal_macros.h"
  : sources

getSources :: IO [FilePath]
getSources = filter (isSuffixOf ".hs") <$> go "src"
  where
    go dir = do<commit_msg>Limit doctests to whitelisted packages.<commit_after>module Main where

import Test.DocTest
import System.Directory
import System.FilePath
import Control.Applicative
import Control.Monad
import Data.List

main :: IO ()
main = getSources >>= \sources -> doctest $
    "-isrc"
  : "-idist/build/autogen"
  : "-optP-include"
  : "-optPdist/build/autogen/cabal_macros.h"
  : "-hide-all-packages"
  : "-package=array"
  : "-package=base"
  : "-package=bytestring"
  : "-package=comonad"
  : "-package=comonad-transformers"
  : "-package=comonads-fd"
  : "-package=containers"
  : "-package=filepath"
  : "-package=ghc-prim"
  : "-package=hashable"
  : "-package=mtl"
  : "-package=parallel"
  : "-package=semigroups"
  : "-package=simple-reflect"
  : "-package=split"
  : "-package=template-haskell"
  : "-package=text"
  : "-package=transformers"
  : "-package=unordered-containers"
  : "-package=vector"
  : sources

getSources :: IO [FilePath]
getSources = filter (isSuffixOf ".hs") <$> go "src"
  where
    go dir = do
{'fraction_non_alphanumeric': 0.15807327001356852, 'fraction_numerical': 0.0, 'mean_word_length': 3.8360655737704916, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, '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': '6465828', 'n_tokens_mistral': 526, 'n_tokens_neox': 521, 'n_words': 102}