Opened 13 months ago

Closed 13 months ago

Last modified 3 months ago

#9016 closed feature request (fixed)

Add System.Exit.die

Reported by: SimonHengel Owned by:
Priority: normal Milestone: 7.10.1
Component: libraries/base Version: 7.8.2
Keywords: report-impact Cc: hvr, matvey.aksenov+ghctrac@…, ekmett
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

(as per the proposal/discussion on haskell-libraries, I just posted a summary that "awaits moderator approval")

Attachments (2)

0001-Add-System.Exit.die.patch (833 bytes) - added by SimonHengel 13 months ago.
0001-Add-System.Exit.die.2.patch (1.1 KB) - added by SimonHengel 13 months ago.

Download all attachments as: .zip

Change History (16)

Changed 13 months ago by SimonHengel

comment:1 Changed 13 months ago by supki

  • Cc matvey.aksenov+ghctrac@… added

comment:2 Changed 13 months ago by hvr

For the mean-time, here's the libraries@ thread

comment:3 Changed 13 months ago by hvr

Simon, would you mind adding an empty line + /Since: 4.7.1.0/ to the haddock string, as well as adding a short libraries/base/changelog.md entry to the patch?

comment:4 Changed 13 months ago by hvr

  • Cc ekmett added
  • Milestone set to 7.10.1

Changed 13 months ago by SimonHengel

comment:5 follow-up: Changed 13 months ago by SimonHengel

Like so, or should the changelog entry be more verbose?

Last edited 13 months ago by SimonHengel (previous) (diff)

comment:6 in reply to: ↑ 5 Changed 13 months ago by hvr

Replying to SimonHengel:

Like so, or should the changelog entry be more verbose?

It's fine, I'll take it from here, thanks :-)

comment:7 Changed 13 months ago by hvr

Ok, this needs Cabal to be tweaked as well, due to an overly optimistic unqualified import in Cabal :-)

libraries/Cabal/Cabal/Distribution/Simple.hs:412:7:
    Ambiguous occurrence ‘die’
    It could refer to either ‘Distribution.Simple.Utils.die’,
                             imported from ‘Distribution.Simple.Utils’ at libraries/Cabal/Cabal/Distribution/Simple.hs:92:11-13
                          or ‘System.Exit.die’,
                             imported from ‘System.Exit’ at libraries/Cabal/Cabal/Distribution/Simple.hs:108:1-18

libraries/Cabal/Cabal/Distribution/Simple.hs:417:7:
    Ambiguous occurrence ‘die’
    It could refer to either ‘Distribution.Simple.Utils.die’,
                             imported from ‘Distribution.Simple.Utils’ at libraries/Cabal/Cabal/Distribution/Simple.hs:92:11-13
                          or ‘System.Exit.die’,
                             imported from ‘System.Exit’ at libraries/Cabal/Cabal/Distribution/Simple.hs:108:1-18

libraries/Cabal/Cabal/Distribution/Simple.hs:591:27:
    Ambiguous occurrence ‘die’
    It could refer to either ‘Distribution.Simple.Utils.die’,
                             imported from ‘Distribution.Simple.Utils’ at libraries/Cabal/Cabal/Distribution/Simple.hs:92:11-13
                          or ‘System.Exit.die’,
                             imported from ‘System.Exit’ at libraries/Cabal/Cabal/Distribution/Simple.hs:108:1-18

libraries/Cabal/Cabal/Distribution/Simple.hs:641:36:
    Ambiguous occurrence ‘die’
    It could refer to either ‘Distribution.Simple.Utils.die’,
                             imported from ‘Distribution.Simple.Utils’ at libraries/Cabal/Cabal/Distribution/Simple.hs:92:11-13
                          or ‘System.Exit.die’,
                             imported from ‘System.Exit’ at libraries/Cabal/Cabal/Distribution/Simple.hs:108:1-18

I've pushed the commit to a wip/-branch for now at https://github.com/ghc/ghc/commit/c4ea79c71ad01287bfbdaafa78bdf195988411e2 until this is resolved in Cabal

comment:8 Changed 13 months ago by Herbert Valerio Riedel <hvr@…>

In e2b14c70c800363db5ccb5c3032eed8b9d7d3747/ghc:

Use import list to hide new System.Exit.die

Soon, System.Exit will export the new `die` (see #9016) which would clash with
Cabal's own `die` implementation. This commit provides forward-compatiblity.

This also updates the Cabal submodule which requires a similiar fix.

Signed-off-by: Herbert Valerio Riedel <[email protected]>

comment:9 Changed 13 months ago by Herbert Valerio Riedel <hvr@…>

In 77ea2eb0ab36d1a610269f6737b509b6f6a376fa/ghc:

Add System.Exit.die (re #9016)

The original proposal discussion can be found at

  http://thread.gmane.org/gmane.comp.lang.haskell.libraries/20872

Note this also updates the Haddock submodule to remove Hadock's local
`die` implementation.

comment:10 Changed 13 months ago by Herbert Valerio Riedel <hvr@…>

In bcd989d13072a189b49d9393b0d4b1bbaede9d36/ghc:

Generalise type of recently added System.Exit.die

This is a follow-up to 77ea2eb0ab36d1a (re #9016) which added `die` with a
return type of `IO ()` even though all other functions in System.Exit have
the more general return type `IO a`. It is assumed this was an oversight in
the original proposal.

Acked-by: Edward Kmett <[email protected]>
Signed-off-by: Herbert Valerio Riedel <[email protected]>

comment:12 Changed 13 months ago by thoughtpolice

  • Resolution set to fixed
  • Status changed from new to closed

This looks like it's done now.

comment:13 Changed 12 months ago by bjornars

I compiled GHC from git with 7.6.3, which worked ok. Now trying to compile GHC from git again, with my newly compiled compiler, I get complaints about:

utils/deriveConstants/DeriveConstants.hs:32:48:
    Ambiguous occurrence ‘die’
    It could refer to either ‘Main.die’,
                             defined at utils/deriveConstants/DeriveConstants.hs:880:1
                          or ‘System.Exit.die’,
                             imported from ‘System.Exit’ at utils/deriveConstants/DeriveConstants.hs:22:1-18

utils/deriveConstants/DeriveConstants.hs:104:28:
    Ambiguous occurrence ‘die’
    It could refer to either ‘Main.die’,
                             defined at utils/deriveConstants/DeriveConstants.hs:880:1
                          or ‘System.Exit.die’,
                             imported from ‘System.Exit’ at utils/deriveConstants/DeriveConstants.hs:22:1-18

utils/deriveConstants/DeriveConstants.hs:742:21:
    Ambiguous occurrence ‘die’
    It could refer to either ‘Main.die’,
                             defined at utils/deriveConstants/DeriveConstants.hs:880:1
                          or ‘System.Exit.die’,
                             imported from ‘System.Exit’ at utils/deriveConstants/DeriveConstants.hs:22:1-18

utils/deriveConstants/DeriveConstants.hs:744:28:
    Ambiguous occurrence ‘die’
    It could refer to either ‘Main.die’,
                             defined at utils/deriveConstants/DeriveConstants.hs:880:1
                          or ‘System.Exit.die’,
                             imported from ‘System.Exit’ at utils/deriveConstants/DeriveConstants.hs:22:1-18

utils/deriveConstants/DeriveConstants.hs:770:29:
    Ambiguous occurrence ‘die’
    It could refer to either ‘Main.die’,
                             defined at utils/deriveConstants/DeriveConstants.hs:880:1
                          or ‘System.Exit.die’,
                             imported from ‘System.Exit’ at utils/deriveConstants/DeriveConstants.hs:22:1-18

utils/deriveConstants/DeriveConstants.hs:888:11:
    Ambiguous occurrence ‘die’
    It could refer to either ‘Main.die’,
                             defined at utils/deriveConstants/DeriveConstants.hs:880:1
                          or ‘System.Exit.die’,
                             imported from ‘System.Exit’ at utils/deriveConstants/DeriveConstants.hs:22:1-18

Is this the same issue?

comment:14 Changed 12 months ago by Herbert Valerio Riedel <hvr@…>

In a15d243e4c15c45a401dec8c30a5135b6b006115/ghc:

Harden imports in `DeriveConstants.hs` module

This was generated by applying `-ddump-minimal-imports` and addresses
the current compile failure (see #9016) with GHC HEAD due to the new
`die` being exported by `System.Exit`

Signed-off-by: Herbert Valerio Riedel <[email protected]>

comment:15 Changed 3 months ago by hvr

  • Keywords report-impact added
Note: See TracTickets for help on using tickets.