
On 6 June 2017 at 23:27, Henk-Jan van Tuyl
versionBranch is still in base, but it is not compatible with Cabal 2.
You mean it isn't re-exported by Cabal-2? Then maybe wxc's Setup.hs needs to explicitly import Data.Version from base rather than relying upon the re-export.
Regards, Henk-Jan van Tuyl
On Tue, 06 Jun 2017 14:32:45 +0200, Ivan Lazar Miljenovic
wrote: On 6 June 2017 at 21:13, Henk-Jan van Tuyl
wrote: You are right, versionBranch is from originally from base, but you are missing the point: package wxc compiles perfectly the first time, but, without anything being changed, does not compile the second time. By the way, I am using a cabal sandbox and as I said earlier, I am using a GHC release candidate.
And in that release candidate, does the version of base have versionBranch in it?
My guess is that a new version of Cabal is being used the second time, which is compiled against the base that comes with that RC which is missing versionBranch.
(But since I don't have any GHC RC's I can't check it myself.)
Regards, Henk-Jan van Tuyl
On Tue, 06 Jun 2017 00:33:40 +0200, Ivan Lazar Miljenovic
wrote: On 6 June 2017 at 07:55, Henk-Jan van Tuyl
wrote: wxc/setup.hs uses versionBranch from Cabal[0]; the function versionBranch is not in Cabal 2, that is why I added "Cabal < 2" to wxc.cabal. When installing wxc the first time, the right version of Cabal is picked, when "cabal install" is invoked a second time, GHC tries to compile wxc/setup.hs again, but with the wrong version of Cabal (note: the release candidate of GHC comes with Cabal 2)
[0]
https://hackage.haskell.org/package/Cabal-1.24.2.0/docs/Distribution-Make.ht...
If you look at the source for this module, you'll see that it isn't defined in there; it's actually from Data.Version in base.
On Mon, 05 Jun 2017 04:58:05 +0200, Ivan Lazar Miljenovic
wrote: I don't think it's a problem with Cabal, but the version of base going by the error: versionBranch is from base, and that error message is talking about compiling the setup.hs from wxc.
On 5 June 2017 at 12:03, Henk-Jan van Tuyl
wrote: > > > > > The strange thing is, that the right version of Cabal is picked, the > first > time wxc is compiled. But when invoking cabal-install the second > time, > the > setup-depends section seems to be ignored (or at least the Cabal < 2 > part). > This does not happen with GHC 8.0.2 > > (By the way, cabal-install tries to compile setup.hs again, even > though > nothing has changed.) > > Regards, > Henk-Jan van Tuyl > > > > On Sun, 04 Jun 2017 13:39:17 +0200, Ivan Lazar Miljenovic > wrote: > >> 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 >> 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@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 --
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com