darcs

Patch 1345 Drop GHC 7.4 support, introduce 'Darcs.Prelude' to abs...

Title Drop GHC 7.4 support, introduce 'Darcs.Prelude' to abs...
Superseder Nosy List ganesh
Related Issues
Status accepted Assigned To
Milestone

Created on 2015-05-31.14:34:24 by ganesh, last changed 2015-06-25.05:55:14 by ganesh.

Files
File name Status Uploaded Type Edit Remove
drop-ghc-7_4-support_-introduce-_darcs_prelude_-to-abstract-over-changes-.dpatch ganesh, 2015-05-31.14:34:23 application/x-darcs-patch
patch-preview.txt ganesh, 2015-05-31.14:34:23 text/x-darcs-patch
unnamed ganesh, 2015-05-31.14:34:23
See mailing list archives for discussion on individual patches.
Messages
msg18421 (view) Author: ganesh Date: 2015-05-31.14:34:23
I'll leave this a few days before screening in case there are any screams.

The key change is that all our 'Prelude' imports are now imports of 'Darcs.Prelude'.
The motivation is to cut down on the pain every time a new Prelude decides to export some new stuff.

From the comment:

This module abstracts over the differences in the Haskell Prelude over multiple GHC versions,
and also hides some symbols that are exported by the Prelude but clash with common names in
the Darcs code.

Broadly it exports everything that the latest Prelude supports, minus the things we explicitly exclude
By default it should be imported with
    import Prelude ()
    import Darcs.Prelude


1 patch for repository darcs-unstable@darcs.net:screened:

Sun May 31 15:26:27 BST 2015  Ganesh Sittampalam <ganesh@earth.li>
  * Drop GHC 7.4 support, introduce 'Darcs.Prelude' to abstract over changes 
  
  This fixes the flood of redundant import warnings from bits of Applicative
  being moved into the Prelude, and also should make future changes of this
  nature easier to handle.
Attachments
msg18422 (view) Author: ganesh Date: 2015-05-31.14:37:06
You can look at the new 'Darcs.Prelude' here:

http://hub.darcs.net/ganesh/darcs-patch1345/patch/20150531142627-
81bb2#src/Darcs/Prelude.hs
msg18426 (view) Author: ganesh Date: 2015-06-07.20:20:21
I've applied this to screened now.
msg18529 (view) Author: bfrk Date: 2015-06-16.22:45:23
I should have screamed earlier ;-)

I read about the trick using import Prelude *after* all other imports
(from libraries). Would this work for us? If yes, I think this is nicer
than adding an import of Darcs.Prelude everywhere.
msg18533 (view) Author: ganesh Date: 2015-06-17.05:59:38
I didn't try the Prelude trick - it sounded a bit fragile to me and I don't 
think it would catch other migrations we've had to do like the switch of 'catch' 
from the Prelude to Control.Exception (because that was a re-definition, not 
just a re-export).

If it does work for the current set of warnings I'm fine with using that 
instead.
msg18612 (view) Author: bfrk Date: 2015-06-23.17:18:26
I withdraw my objections. You arguments about robustness sound
convincing and anyway I am not in a position to test this because I have
not even ghc 7.8 installed, much less 7.10.
msg18623 (view) Author: ganesh Date: 2015-06-25.05:41:11
I'm self-accepting this as there are no remaining objections and it's 
been around for a while.
History
Date User Action Args
2015-05-31 14:34:24ganeshcreate
2015-05-31 14:37:06ganeshsetstatus: needs-screening -> in-discussion
messages: + msg18422
2015-06-07 20:20:21ganeshsetstatus: in-discussion -> needs-review
messages: + msg18426
2015-06-16 22:45:23bfrksetmessages: + msg18529
2015-06-17 05:59:39ganeshsetmessages: + msg18533
2015-06-23 17:18:26bfrksetmessages: + msg18612
2015-06-25 05:41:11ganeshsetstatus: needs-review -> accepted-pending-tests
messages: + msg18623
2015-06-25 05:55:14ganeshsetstatus: accepted-pending-tests -> accepted