the work around i did for cabal 1.18 compatibility for llvm-base can be
found here:

https://github.com/bos/llvm/blob/master/base/Setup.hs#L116-L144
this used the fact that cabal exposes the cabal version as a library value
to generate a correct wrapper for either API version

alternatively, you can change your setup.hs so that api isn't needed.

also: before emailing cafe, its always good to email the listed maintainers
first! (i've included them on CC for this email)



On Tue, Sep 10, 2013 at 9:27 PM, Thiago Negri <evoh...@gmail.com> wrote:

> The package GLFW is not building in Cabal 1.18.
>
> Setup.hs [1] depends on `rawSystemStdInOut` [2] that changed signature
> between 1.16 and 1.18.
>
> Is this considered a public API of Cabal?
>
>
> Cabal 1.16
> rawSystemStdInOut
>  :: Verbosity
>  -> FilePath
>  -> [String]
>  -> Maybe (String, Bool)
>  -> Bool
>  -> IO (String, String, ExitCode)
>
>
> Cabal 1.18
> rawSystemStdInOut
>  :: Verbosity
>  -> FilePath
>  -> [String]
>  -> Maybe FilePath -- new arg
>  -> Maybe [(String, String)] -- new arg
>  -> Maybe (String, Bool)
>  -> Bool
>  -> IO (String, String, ExitCode)
>
>
>
> Compilation output:
>
> [1 of 1] Compiling Main             (
> /tmp/GLFW-0.5.1.0-4035/GLFW-0.5.1.0/Setup.hs,
> /tmp/GLFW-0.5.1.0-4035/GLFW-0.5.1.0/dist/setup/Main.o )
>
> /tmp/GLFW-0.5.1.0-4035/GLFW-0.5.1.0/Setup.hs:167:33:
>     Couldn't match expected type `IO (t0, t1, ExitCode)'
>                 with actual type `Maybe (String, Bool)
>                                   -> Bool -> IO (String, String, ExitCode)'
>     In the return type of a call of `rawSystemStdInOut'
>     Probable cause: `rawSystemStdInOut' is applied to too few arguments
>     In a stmt of a 'do' block:
>       (out, err, exitCode) <- rawSystemStdInOut
>                                 verbosity "cc" (["-c", path, "-o",
> objPath] ++ flags) Nothing False
>     In the expression:
>       do { hClose outHandle;
>            hPutStr inHandle contents;
>            hClose inHandle;
>            (out, err, exitCode) <- rawSystemStdInOut
>                                      verbosity "cc" (["-c", path, ....] ++
> flags) Nothing False;
>            .... }
>
> /tmp/GLFW-0.5.1.0-4035/GLFW-0.5.1.0/Setup.hs:167:113:
>     Couldn't match expected type `Maybe [(String, String)]'
>                 with actual type `Bool'
>     In the fifth argument of `rawSystemStdInOut', namely `False'
>     In a stmt of a 'do' block:
>       (out, err, exitCode) <- rawSystemStdInOut
>                                 verbosity "cc" (["-c", path, "-o",
> objPath] ++ flags) Nothing False
>     In the expression:
>       do { hClose outHandle;
>            hPutStr inHandle contents;
>            hClose inHandle;
>            (out, err, exitCode) <- rawSystemStdInOut
>                                      verbosity "cc" (["-c", path, ....] ++
> flags) Nothing False;
>            .... }
> Failed to install GLFW-0.5.1.0
>
>
> [1] http://code.haskell.org/GLFW/Setup.hs
> [2]
> https://github.com/haskell/cabal/blob/d16c307c33fb7af19d8f17a2ad8be4902a3af21e/Cabal/Distribution/Simple/Utils.hs#L454
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to