All Unkept
Posted in: Haskell  —  21 November 2008

Haskell regex problem - help needed!

I need some help! I did someone a good deed on a blog the other day, so I'm swallowing my pride and asking for a random kind deed from someone who knows something.

While trying to compile this snippet, I get this compilation error - a complaint about a missing instance.

This occurs with:

  • GHC 6.8.2
  • Various packages installed system wide (ubuntu 8.04 packages) and locally (using cabal --user --prefix=$HOME/local)
  • bytestring-0.9.0.2 or anything later

If I revert to the bytestring that comes with my system, 0.9.0.1 , the error goes away. Having finally looked at the differences between 0.9.0.1 and 0.9.0.2, which are tiny, and do not include any differences when it comes to the definition of typeclass instances, it seems clear that this isn't really the problem, but something else very funny is going on. But I do not have the first what.

I was just coping with it by sticking with bytestring-0.9.0.1, but I won't be able to do that forever...

Do I have to rebuild all the packages in my system or something evil? Any ideas?

Thanks in advance!

Comments §

§ On 21 November 2008, Georg Brandl wrote:
375 Are you sure the regex libraries are built against the same version of bytestring? I noticed the (I think) same problem after upgrading bytestring and then trying to upgrade one of the three regex libraries.

Use "ghc-pkg describe <pkgname>" to find out which versions your regex packages are built against.

§ On 21 November 2008, BMeph wrote:
376 I'd recommend checking out Georg's advice. Especially, since it seems that your newer version of bytestring was installed with the --user option. This all-but guarantees that your system libraries will not use the newer versions unless you refer to those libs directly.

§ On 21 November 2008, luke wrote:
378 Thanks! That seems to have solved my problem - my code loads into ghci anyway, to properly build my program there are a ton of other packages I have to rebuild (for them I get a message telling me so, due to depending on "multiple versions of the same
package").

Essentially it seems it's just this bug:

http://hackage.haskell.org/trac/hackage/ticket/131


§ On 22 November 2008, luke wrote:
379 This is actually pretty sucky...

It was trying to install yi that forced me to upgrade to bytestring 0.9.1.4, and to install yi the first thing it complained at was missing gtk2hs. I installed that, but then once bytestring was updated, the 'cairo' package (part of gtk2hs) had to be rebuilt, since it was originally built against bytestring 0.9.0.1, which actually meant rebuilding all of gtk2hs...

Anyway...

Add comment

Format:

  • Javascript has to be on to get past my spam protection, and cookies, and there is a delay, sorry for any inconvenience!
  • I reserve the right to moderate comments.