summaryrefslogtreecommitdiff
path: root/Setup.lhs
blob: e3f98477be48314e0a4a2149c710144a2ec3d4fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /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 }

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