prelude-compat: Provide Prelude and Data.List with fixed content across GHC versions
This package allows you to write warning-free code
that compiles with versions of
base before and after AMP and FTP,
base before and beginning with 4.8, respectively,
and GHC before and beginning with 7.10, respectively.
It serves three purposes:
Prevent you from name clashes of FTP-Prelude with locally defined functions having names like
Prevent you from redundant import warnings if you manually import Data.Monoid or Control.Applicative.
Fix list functions to the list type, contrarily to the aim of the FTP. This way you are saved from
length (2,1) == 1and
maximum (2,1) == 1, until you import
You should add
import Prelude2010 import Prelude ()
to your modules.
This way, you must change all affected modules.
If you want to avoid this you may try the
or if you already import Prelude explicitly, you may try to add
Default-Extensions: CPP, NoImplicitPrelude CPP-Options: -DPrelude=Prelude2010
to your Cabal file.
In my opinion, this is the wrong way round.
The presented Prelude2010 module should have been the one for GHC-7.10
and the Prelude with added and generalized list functions
should have been an additional PreludeFTP,
preferably exported by a separate package
like all other alternate Prelude projects.
But the purpose of the FTP was to save some import statements
at the expense of blowing up the
and prevent simple ways to write code that works
with GHC version before and starting with GHC-7.10
and that does not provoke warnings.
'base-compat': The opposite approach - Make future function definitions available in older GHC versions.
haskell2010: Defines the Prelude for Haskell 2010. Unfortunately,
haskell2010is not available anymore since GHC-7.10, because of the AMP.
'numeric-prelude': It is intended to provide a refined numeric class hierarchy but it also provides a non-numeric subset of the Prelude that is more stable than the one of
[Index] [Quick Jump]
- prelude-compat-0.0.0.2.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
For package maintainers and hackage trustees
|Versions [RSS]||0.0, 0.0.0.1, 0.0.0.2 (info)|
|Dependencies||base (>=3 && <5) [details]|
|Category||Prelude, Haskell2010, Compatibility|
|Source repo||this: darcs get http://hub.darcs.net/thielema/prelude-compat --tag 0.0.0.2
head: darcs get http://hub.darcs.net/thielema/prelude-compat
|Uploaded||by HenningThielemann at 2019-05-23T19:41:07Z|
|Distributions||LTSHaskell:0.0.0.2, NixOS:0.0.0.2, Stackage:0.0.0.2|
|Reverse Dependencies||11 direct, 22 indirect [details]|
|Downloads||2926 total (18 in the last 30 days)|
|Rating||(no votes yet) [estimated by Bayesian average]|
|Status||Docs available [build log]
Last success reported on 2019-05-23 [all 1 reports]