Opened 8 years ago

Closed 8 years ago

#5701 closed bug (fixed)

SafeHaskell causes deepseq to fail to compile

Reported by: tibbe Owned by: igloo
Priority: high Milestone: 7.4.1
Component: libraries (other) Version: 7.3
Keywords: Cc: johan.tibell@…, dterei
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

SafeHaskell still affects users who haven't opted in to using it. Using the ghc-7.4 branch:

$ cabal install -w /Users/tibell/src/ghc/inplace/bin/ghc-stage2
Configuring deepseq-1.2.0.1...
Preprocessing library deepseq-1.2.0.1...
Building deepseq-1.2.0.1...
[1 of 1] Compiling Control.DeepSeq  ( Control/DeepSeq.hs, dist/build/Control/DeepSeq.o )

Control/DeepSeq.hs:56:1:
    array-0.3.0.3:Data.Array can't be safely imported! The module itself isn't safe.

Change History (7)

comment:1 Changed 8 years ago by dterei

hmm thats worrying, I'll take a look at it asap

comment:2 Changed 8 years ago by dterei

Owner: changed from dterei to igloo

OK this is actually a version dependency issue.

DeepSeq is using Safe explicitly. Which should be fine except only array-0.4.0.0 is using Safe Haskell.

DeepSeq only uses Safe with ghc-7.4 and higher (array-0.4.0.0 is released with ghc-7.4) so it seems it should be OK. Except the cabal file for deepseq has an incorrect restriction that array >= 0.1 < 0.4. This restriction should really be changed to >= 0.1 < 0.5 or something. Or perhaps even make it >= 0.4. Seems a little fragile to detect if array is using safe haskell by detecting ghc version. Better to require the correct array version.

I'm changing the owner to Ian since this is on the stable branch and more his territory with version numbers and all.

comment:3 Changed 8 years ago by dterei

Ian could you also change this to a high priority item please.

comment:4 Changed 8 years ago by dterei

Cc: dterei added

comment:5 Changed 8 years ago by dterei

Component: Compilerlibraries (other)

comment:6 Changed 8 years ago by igloo

difficulty: Unknown
Milestone: 7.4.1
Priority: normalhigh

comment:7 Changed 8 years ago by igloo

Resolution: fixed
Status: newclosed

deepseq in the 7.4 branch has a < 0.5 dep on array.

Note: See TracTickets for help on using tickets.