summaryrefslogtreecommitdiff
path: root/Setup.lhs
blob: ba435f01880ddfa63ec0f488205fc2472d63db87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#! /usr/bin/env runhaskell

> import Distribution.Simple
> import Distribution.Simple.Setup
> import Distribution.PackageDescription
> import Distribution.Simple.LocalBuildInfo

> import System.Process(system)
> import Config(config)

> main = defaultMainWithHooks simpleUserHooks { confHook = c, runTests = t }

> c x y = do
>     binfo <- confHook simpleUserHooks x y
>     pbi <- config binfo
>     let pkg_descr = localPkgDescr binfo
>     return $ binfo { localPkgDescr = updatePackageDescription pbi pkg_descr }

> t _ _ _ _ = system ( "runhaskell examples/tests.hs") >> return()