Skip to content

Commit

Permalink
Fix Setup.lhs for Cabal 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
nh2 committed May 3, 2013
1 parent fb6d751 commit e56e98c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions Setup.lhs
Expand Up @@ -4,10 +4,10 @@ arch-tag: Main setup script
> import Distribution.Simple
> import Distribution.Simple.Configure
> import Distribution.Simple.LocalBuildInfo
> import Distribution.Setup
> import Distribution.Simple.Setup
> import Distribution.PackageDescription
> import IO
> import System
> import Distribution.Text (display)
> import System.IO
> import System.Posix.Files

> main = defaultMainWithHooks myUserHooks
Expand All @@ -17,23 +17,23 @@ arch-tag: Main setup script
> { instHook = myInstaller
> }
>
> myInstaller :: PackageDescription -> LocalBuildInfo -> Maybe UserHooks -> InstallFlags -> IO ()
> myInstaller pdesc lbi mhook userFlags =
> do instHook defaultUserHooks pdesc lbi mhook userFlags
> myInstaller :: PackageDescription -> LocalBuildInfo -> UserHooks -> InstallFlags -> IO ()
> myInstaller pdesc lbi hook userFlags =
> do instHook defaultUserHooks pdesc lbi hook userFlags
> myPostInstaller pdesc userFlags lbi
>
> -- | Build and install the shell script to invoke the Haskell compiler with
> -- the correct flags
> myPostInstaller :: PackageDescription -> InstallFlags -> LocalBuildInfo -> IO ()
> myPostInstaller pdesc instFlags localBuildInfo =
> let hc = compiler localBuildInfo
> bindir = prefix localBuildInfo ++ "/bin"
> bindir = prefix (absoluteInstallDirs pdesc localBuildInfo NoCopyDest) ++ "/bin" -- TODO check if NoCopyDest is correct
> generated = bindir ++ "/washc"
> pid = showPackageId (package pdesc)
> pid = display (package pdesc)
> in
> do h <- openFile generated WriteMode
> hPutStrLn h "#!/bin/sh"
> hPutStr h (compilerPath hc)
> hPutStr h "ghc"
> hPutStr h " -pgmF "
> hPutStr h bindir
> hPutStr h "/wash2hs"
Expand Down
2 changes: 1 addition & 1 deletion WASH.cabal
Expand Up @@ -8,7 +8,7 @@ Homepage: http://www.informatik.uni-freiburg.de/~thiemann/haskell/WASH/
Category: Web
Stability: Beta
Synopsis: WASH is a family of embedded domain specific languages (EDSL) for programming Web applications in Haskell.
Build-Depends: base, regex-compat, haskell98, parsec
Build-Depends: base, regex-compat, haskell98, parsec, Cabal
Extensions: ForeignFunctionInterface
Exposed-Modules:
WASH.CGI.AbstractSelector
Expand Down

0 comments on commit e56e98c

Please sign in to comment.