vector: ‘ANN type’ without GHCi

Nikita Karetnikov nikita at karetnikov.org
Sun Mar 30 22:05:18 UTC 2014


The latest Hackage version and HEAD fail to build on mips64el due to the
ANN pragma in ‘Data/Vector/Fusion/Stream/Monadic.hs’:

[ 5 of 21] Compiling Data.Vector.Fusion.Stream.Monadic ( Data/Vector/Fusion/Stream/Monadic.hs, dist/build/Data/Vector/Fusion/Stream/Monadic.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 7.6.3 for mipsel-unknown-linux):
	Cant do annotations without GHCi
    {Data/Vector/Fusion/Stream/Monadic.hs:104:19-33}
    base:GHC.Exts.ForceSpecConstr{d r2i8}

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

Here’s the relevant part of the code:

data SPEC = SPEC | SPEC2
#if __GLASGOW_HASKELL__ >= 700
{-# ANN type SPEC ForceSpecConstr #-}
#endif

Is it possible to use CPP along with some configure flag to determine if
GHCi is available, and if it is not, skip the said pragma?  I tested the
Hackage version, and it builds fine if I comment out the mentioned
lines.

Does the lack of the pragma make a big difference?  (The relevant
section of the GHC manual is very brief.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140331/bfea4ad7/attachment.sig>


More information about the Libraries mailing list