Ticket #5701 (closed bug: fixed)

Opened 6 months ago

Last modified 4 months ago

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 Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

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

Changed 6 months ago by dterei

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

Changed 5 months 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.

Changed 5 months ago by dterei

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

Changed 5 months ago by dterei

  • cc dterei added

Changed 5 months ago by dterei

  • component changed from Compiler to libraries (other)

Changed 5 months ago by igloo

  • priority changed from normal to high
  • difficulty set to Unknown
  • milestone set to 7.4.1

Changed 4 months ago by igloo

  • status changed from new to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.