1

as of the time of this writing, I'm running the newest GHC (7.9.20140608) and cabal (1.20.0.0), and it seems that attoparsec is failing.

Data/Attoparsec/ByteString/Internal.hs:519:7:
    Illegal equational constraint a_audv ~ (ByteString, t)
    (Use GADTs or TypeFamilies to permit this)
    In the context: (a_audv ~ (ByteString, t))
    While checking the inferred type for ‘succ'’
    In the expression:
      let
        succ' t' pos' more' a
          = succ t' pos' more' (substring pos (pos' - pos) t', a)
      in runParser p t pos more lose succ'
    In the second argument of ‘($)’, namely
      ‘\ t pos more lose succ
         -> let succ' t' pos' more' a = ...
            in runParser p t pos more lose succ'’

Am I missing any language extensions? Or would this issue be a little more tricky? Here is my cabal file: http://lpaste.net/105329

Any help with this would be incredible :) Happy Hacking!

Athan Clark
  • 3,886
  • 2
  • 21
  • 39
  • 3
    The error message indicates that attoparsec just needs to specify some extensions that aren't required for the released versions of GHC. Why are you using a nightly snapshot? They're really unstable, and they will introduce breaking changes that most library maintainers don't address until near the release date. – John L Jun 09 '14 at 08:43
  • ahh I see, thank you. What would be the standard method of upgrading to >=7.8 if your distribution's package manager doesn't have it? Thanks again for your help. – Athan Clark Jun 09 '14 at 11:18
  • There isn't a standard method of using GHC newer than 7.8. The only people who should be using any newer version of GHC than 7.8 are people who are working on GHC itself. At this point, it's way too early to even be fixing up libraries to work with 7.10 - there's still too many changes coming. – Carl Jun 09 '14 at 20:45
  • Ahh I see, that makes sense. However, I have seen some difficulty myself in getting 7.8.2.1 to work on ubuntu 14.04. I had some success in gentoo, but I'm ports-savvy yet. What would be your distribution of choice to get a new-age haskell toolchain up and running? – Athan Clark Jun 10 '14 at 06:31

1 Answers1

2

For now, the best way to use ghc-7.8 (if your distro package manager doesn't include it) is to go to the ghc download page and follow the directions for the current stable release. There are binary packages, or you can install from source (with a source tarball, this can be as simple as ./configure && make && make install, but you'll need to have a working ghc already).

If you do install from source, you might consider changing the version, e.g. to 7.8.2.1. You can do this by editing the AC_INIT line in configure.ac then executing autoreconf before configure. If you do this, and also install to a version-specific location (e.g. /usr/local/ghc/ghc-7.8.2.1.src, this can be set via ./configure --PREFIX=/path/to/install), you'll be able to have your locally-compiled version installed concurrently with the packaged installation (or platform, or any other versions).

Be advised that ghc-7.8.3 is due out shortly (probably within two weeks at most); it's a bugfix release. Also there is currently no Haskell Platform release that includes ghc-7.8, so that's not an option at this time.

John L
  • 27,937
  • 4
  • 73
  • 88