
On 20 January 2011 17:30, Gwern Branwen
* You need to loosen the base upper bound to < 4.4 * If using base >= 4, you need to depend on the syb package as well (current version 0.3)
Would this break GHC 6.12 builds?
Thats why I suggested the flag stanza. Cabal has a weird kind of flag semantics where it will try every possible combination of flags until it finds one that builds. The solution I suggested uses this behaviour to either depend on base >= 4 && < 4.4 WITH syb, OR base < 4 WITHOUT syb. Because of the default flag setting of True, the first possibility will be tried first, but it if fails Cabal will just fall back on base < 4. In short, it should work perfectly for either GHC 7 or 6.12 clients (modulo syntax issues - I haven't actually tried the syntax I sent you).
data-memocombinators is only the tip of the iceberg; I believe much of lambdabot would need modifications. (Apparently Control.OldException has gone away, which alone guarantees many changes.) So there wouldn't be much point to changing show.
Actually, I: * Fixed the show upper bound * Fixed data-memocombinators and data-inttrie upper bounds (and sent a pull request to get Luke to take these changes upstream) * Got Wouter to change the upper bound on IOSpec (will be in the 0.2.2 release, out soon) And after all that lambdabot seemed to compile OK (though I got a link-time error about iconv because I'm on a Mac). So if you fix show GHC 7 users will be able to cabal install lambdabot! Cheers, Max

On Thu, Jan 20, 2011 at 12:45 PM, Max Bolingbroke
On 20 January 2011 17:30, Gwern Branwen
wrote: * You need to loosen the base upper bound to < 4.4 * If using base >= 4, you need to depend on the syb package as well (current version 0.3)
Would this break GHC 6.12 builds?
Thats why I suggested the flag stanza. Cabal has a weird kind of flag semantics where it will try every possible combination of flags until it finds one that builds. The solution I suggested uses this behaviour to either depend on base >= 4 && < 4.4 WITH syb, OR base < 4 WITHOUT syb. Because of the default flag setting of True, the first possibility will be tried first, but it if fails Cabal will just fall back on base < 4.
In short, it should work perfectly for either GHC 7 or 6.12 clients (modulo syntax issues - I haven't actually tried the syntax I sent you).
No, there's another issue. I've recorded this version; hunk ./show/show.cabal 25 +Flag base4 + Description: Build with base-4 + Default: False + hunk ./show/show.cabal 32 - build-depends: base<4, random, QuickCheck>=2.4, smallcheck>=0.4 + build-depends: random, QuickCheck>=2.4, smallcheck>=0.4 + if flag(base4) + build-depends: base>=4 && <4.4, syb >= 0.3 && < 0.4 + else + build-depends: base<4 Notice the flag defaults to False, not True. When I tried it with True, I got: $ cabal install Resolving dependencies... cabal: dependencies conflict: base-3.0.3.2 requires syb ==0.1.0.2 however syb-0.1.0.2 was excluded because syb-0.3 was selected instead syb-0.1.0.2 was excluded because show-0.4.1 requires syb ==0.3.* -- gwern http://www.gwern.net

On 20 January 2011 20:50, Gwern Branwen
Notice the flag defaults to False, not True. When I tried it with True, I got:
$ cabal install Resolving dependencies... cabal: dependencies conflict: base-3.0.3.2 requires syb ==0.1.0.2 however syb-0.1.0.2 was excluded because syb-0.3 was selected instead syb-0.1.0.2 was excluded because show-0.4.1 requires syb ==0.3.*
Suprising. It certainly seems to contradict my understanding of how Cabal works (which is derived from http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.ht...) Anyway, I'm glad that you have recorded a patch which at least gives GHC 7 a chance of working. If I knew where the repo was I would try it out (it doesn't seem to be linked anywhere from http://hackage.haskell.org/packages/archive/show/0.4.1/show.cabal). Cheers, Max

On Thu, Jan 20, 2011 at 5:33 PM, Max Bolingbroke
On 20 January 2011 20:50, Gwern Branwen
wrote: Notice the flag defaults to False, not True. When I tried it with True, I got:
$ cabal install Resolving dependencies... cabal: dependencies conflict: base-3.0.3.2 requires syb ==0.1.0.2 however syb-0.1.0.2 was excluded because syb-0.3 was selected instead syb-0.1.0.2 was excluded because show-0.4.1 requires syb ==0.3.*
Suprising. It certainly seems to contradict my understanding of how Cabal works (which is derived from http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.ht...)
Anyway, I'm glad that you have recorded a patch which at least gives GHC 7 a chance of working. If I knew where the repo was I would try it out (it doesn't seem to be linked anywhere from http://hackage.haskell.org/packages/archive/show/0.4.1/show.cabal).
It's just a folder in the lambdabot repo, as is lambdabot-utils and unlambda and brainfuck. -- gwern http://www.gwern.net

On 20 January 2011 22:39, Gwern Branwen
It's just a folder in the lambdabot repo, as is lambdabot-utils and unlambda and brainfuck.
I'm happy to report that show-0.4.1.1 does in fact build in my GHC 7 environment unmodified, so the Cabal hackery is working. You might consider pushing this tweaked version to Hackage. Cheers, Max
participants (2)
-
Gwern Branwen
-
Max Bolingbroke