Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReadInt code doesn't compile with GHC 7.4 #37

Closed
snoyberg opened this issue Jan 28, 2012 · 2 comments
Closed

ReadInt code doesn't compile with GHC 7.4 #37

snoyberg opened this issue Jan 28, 2012 · 2 comments

Comments

@snoyberg
Copy link
Member

Hey @erikd

I get the following error message compiling on 7.4.

ReadInt.hs:37:27:
    Couldn't match kind `#' against `*'
    In the first argument of `I#', namely
      `(word2Int# $ indexWord8OffAddr# addr (ord# i))'
    In the expression:
      I# (word2Int# $ indexWord8OffAddr# addr (ord# i))
    In an equation for `mhDigitToInt':
        mhDigitToInt (C# i)
          = I# (word2Int# $ indexWord8OffAddr# addr (ord# i))
          where
              !(Table addr) = table
              table :: Table
              table
                = Table
                   "\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\SOH\STX\ETX\EOT\ENQ\ACK\a\b\t\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL"#

The easy fix is to revert to digitToInt, but that's obviously not too efficient. I don't mind using that as a stop-gap measure until you have a chance to look at this, just let me know.

@erikd
Copy link
Contributor

erikd commented Jan 28, 2012

@snoyberg I'll pull down 7.4 and have a look at this within the next 24-36 hours.

There actually might even be a faster and saner version of readInt that doesn't use MagicHash.

@erikd
Copy link
Contributor

erikd commented Jan 28, 2012

Just sent a pull request to fix this.

Will also have a faster/saner version of readInt in the near future (from a yet to be released version of a hackage library).

@snoyberg snoyberg closed this as completed Feb 1, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants