[Haskell-cafe] Bug in GHC or cabal-install?

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Sun Jun 4 11:39:17 UTC 2017


This is from a limitation/bug with Cabal-the-library, in that there
are typically no dependency checks for custom Setup.[l]hs
configurations.

wxc has such a custom one:
http://hackage.haskell.org/package/wxc-0.92.3.0/src/Setup.hs

versionBranch is from Data.Version in base, and it appears that the in
this GHC pre-release there's been a change in base that removed this
function.

On 4 June 2017 at 19:45, Henk-Jan van Tuyl <hjgtuyl at chello.nl> wrote:
>
> L.S.,
>
> I am trying the prerelease of GHC, version 8.2.0.20170507
>
> I adapted wxHaskell to the new packages that come with the new GHC and it
> compiles now, but only the first time. If I compile it a second time, even
> if nothing has changed, the information from the custom-setup section of
> the wxc.cabal file seems to be forgotten. This section looks like this:
>
> custom-setup
>   setup-depends:
>     base,
>     Cabal < 2,
>     containers,
>     bytestring,
>     split,
>     process,
>     directory,
>     filepath
> (I am using cabal-install 1.24.0.2)
>
> Output from the second time I try to install wxHaskell:
>
>> cabal install --force-reinstalls --reinstall wxdirect wxc wxcore wx
>
> [1 of 1] Compiling Main             (
> X:\Temp\wxHaskell\wxcore\dist\setup\setup.hs,
> X:\Temp\wxHaskell\wxcore\dist\setup\Main.o )
> Linking X:\Temp\wxHaskell\wxcore\dist\setup\setup.exe ...
> [1 of 1] Compiling Main             (
> X:\Temp\wxHaskell\wxc\dist\setup\setup.hs,
> X:\Temp\wxHaskell\wxc\dist\setup\Main.o )
>
> X:\Temp\wxHaskell\wxc\dist\setup\setup.hs:505:61: error:
>                       Variable not in scope: versionBranch :: Version ->
> [a0]
>                       |
> 505 |           full_ver = (concat . intersperse "." . map show .
> versionBranch) ver
>                       |
> ^^^^^^^^^^^^^
>
> This error message indicates that the wrong version of Cabal (2.0) is used
> to compile the wxcore setup.hs
> It looks like a cabal-install bug, but this does not happen when I
> use GHC 8.0.2; should I write a GHC bug ticket?
>
> Regards,
> Henk-Jan van Tuyl
>
>
> --
> Folding at home
> What if you could share your unused computer power to help find a cure? In
> just 5 minutes you can join the world's biggest networked computer and get
> us closer sooner. Watch the video.
> http://foldingathome.stanford.edu/
>
>
> http://Van.Tuyl.eu/
> http://members.chello.nl/hjgtuyl/tourdemonad.html
> Haskell programming
> --
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.



-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
http://IvanMiljenovic.wordpress.com


More information about the Haskell-Cafe mailing list