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