vector: ‘ANN type’ without GHCi

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.)

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
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@haskell.org http://www.haskell.org/mailman/listinfo/libraries

It might be a much nicer story if stage-1 builds simply ignored ANN pragmas entirely.
That’s just what happens: it’s a non-fatal warning:
Foo.hs:5:1: Warning:
Ignoring ANN annotation, because this is a stage-1 compiler or doesn't support GHCi
Simon
From: Libraries [mailto:libraries-bounces@haskell.org] On Behalf Of Edward Kmett
Sent: 31 March 2014 00:22
To: Nikita Karetnikov
Cc: Haskell Libraries
Subject: Re: vector: ‘ANN type’ without GHCi
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

Hi, Am Dienstag, den 01.04.2014, 13:05 +0000 schrieb Simon Peyton Jones:
It might be a much nicer story if stage-1 builds simply ignored ANN pragmas entirely.
That’s just what happens: it’s a non-fatal warning:
Foo.hs:5:1: Warning:
Ignoring ANN annotation, because this is a stage-1 compiler or doesn't support GHCi
but only since 7.8 (#4268). /me looks forward to not having to patch vector and other packages in Debian. Greetings, Joachim -- Joachim “nomeata” Breitner mail@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0x4743206C Debian Developer: nomeata@debian.org

or android or ios! (ie, its now a builtin, rather than a bundled ghc
plugin)
On Tue, Apr 1, 2014 at 9:34 AM, Joachim Breitner
Hi,
Am Dienstag, den 01.04.2014, 13:05 +0000 schrieb Simon Peyton Jones:
It might be a much nicer story if stage-1 builds simply ignored ANN pragmas entirely.
That’s just what happens: it’s a non-fatal warning:
Foo.hs:5:1: Warning:
Ignoring ANN annotation, because this is a stage-1 compiler or doesn't support GHCi
but only since 7.8 (#4268).
/me looks forward to not having to patch vector and other packages in Debian.
Greetings, Joachim
-- Joachim “nomeata” Breitner mail@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0x4743206C Debian Developer: nomeata@debian.org
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
participants (5)
-
Carter Schonwald
-
Edward Kmett
-
Joachim Breitner
-
Nikita Karetnikov
-
Simon Peyton Jones