#!/usr/bin/env runhaskell -v -i. -fglasgow-exts -fno-monomorphism-restriction > {-# OPTIONS -fglasgow-exts #-} > module Main where > import Distribution.Simple > import Distribution.Simple.Utils > main :: IO () > main = defaultMainWithHooks defaultUserHooks > { runTests = \args _ _ _ -> performTests args } Ugly and redundant but future Cabal tools may depend on this /-: > performTests args > = rawSystemPath 0 "ghc" ["-e" > ,"runUnitTests " ++ show debug > ,"dist/build/conjure/conjure-tmp/sha1.o" > ,"-fglasgow-exts" > ,"-fno-monomorphism-restriction" > ,"UnitTests.hs"] > where debug = "--debug" `elem` args