<commit_before>version := $(shell awk '/^version:/{print $$2}' ../text.cabal)
ghc := ghc
ghc-opt-flags = -O0
ghc-base-flags := -funbox-strict-fields -package criterion \
	-package bytestring -package QuickCheck -package test-framework \
	-package test-framework-quickcheck -ignore-package text \
	-fno-ignore-asserts
ghc-base-flags += -Wall -fno-warn-orphans -fno-warn-missing-signatures
ghc-flags := $(ghc-base-flags) -i../dist/build -package-name text-$(version)
ghc-hpc-flags := $(ghc-base-flags) -fhpc -fno-ignore-asserts -odir hpcdir \
	-hidir hpcdir -i..
lib := ../dist/build/libHStext-$(version).a
lib-srcs := $(shell grep '^  *Data' ../text.cabal | \
                    sed -e 's,\.,/,g' -e 's,$$,.hs,')

cabal := $(shell which cabal 2>/dev/null)

all: bm qc coverage

lib: $(lib)

$(lib): $(lib-srcs:%=../%)
ifeq ($(cabal),)
	cd .. && runghc Setup configure --user --prefix=$(HOME)
	cd .. && runghc Setup build
else
	cd .. && cabal configure
	cd .. && cabal build
endif

Properties.o: QuickCheckUtils.o SlowFunctions.o

QuickCheckUtils.o: $(lib)

qc: Properties.o QuickCheckUtils.o SlowFunctions.o<commit_msg>Split out packages needed for tests.<commit_after>version := $(shell awk '/^version:/{print $$2}' ../text.cabal)
ghc := ghc
ghc-opt-flags = -O0
ghc-base-flags := -funbox-strict-fields -package criterion \
	-package bytestring -ignore-package text \
	-fno-ignore-asserts
ghc-test-flags := -package QuickCheck -package test-framework \
	-package test-framework-quickcheck
ghc-base-flags += -Wall -fno-warn-orphans -fno-warn-missing-signatures
ghc-flags := $(ghc-base-flags) -i../dist/build -package-name text-$(version)
ghc-hpc-flags := $(ghc-base-flags) -fhpc -fno-ignore-asserts -odir hpcdir \
	-hidir hpcdir -i..
lib := ../dist/build/libHStext-$(version).a
lib-srcs := $(shell grep '^  *Data' ../text.cabal | \
                    sed -e 's,\.,/,g' -e 's,$$,.hs,')

cabal := $(shell which cabal 2>/dev/null)

all: bm qc coverage

lib: $(lib)

$(lib): $(lib-srcs:%=../%)
ifeq ($(cabal),)
	cd .. && runghc Setup configure --user --prefix=$(HOME)
	cd .. && runghc Setup build
else
	cd .. && cabal configure
	cd .. && cabal build
endif

Properties.o qc qc-hpc: ghc-flags += $(ghc-test-flags)
Properties.o: QuickCheckUtils.o SlowFunctions.o

QuickCheckUtils.o: $(lib)

qc: Properties.o QuickCheckUtils.o SlowFunctions.o
{'fraction_non_alphanumeric': 0.19365895458440446, 'fraction_numerical': 0.002570694087403599, 'mean_word_length': 3.2148014440433212, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1595285', 'n_tokens_mistral': 899, 'n_tokens_neox': 878, 'n_words': 204}