Re: vector: ‘ANN type’ without GHCi

Edward Kmett ekmett at gmail.com
Sun Mar 30 23:22:06 UTC 2014


Unfortunately, that pragma pretty much makes the difference between vector
being fast, getting benefits out of stream fusion for all those
intermediate stream types and not.

It might be a much nicer story if stage-1 builds simply ignored ANN pragmas
entirely.

As it is I get complaints from distribution maintainers with wide
distributions about any use of module or function annotations for HLint,
and this particular ForceSpecConstr annotation has come up as a source of
pain for Austin before, though I've forgotten the details as to why.

-Edward


On Sun, Mar 30, 2014 at 6:05 PM, Nikita Karetnikov <nikita at karetnikov.org>wrote:

> 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.)
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140330/cfcdeb2e/attachment.html>


More information about the Libraries mailing list