Newer Haskell base functions on older compilers, without CPP
open sourceMITfree
base-compat backports functions from newer versions of Haskell's base library to older compilers, so code can use them without CPP pragmas, and includes accepted library proposals headed for base. It backports functions only, not data types or type classes, adds no orphan instances (base-orphans does that) and has no dependencies; its companion base-compat-batteries widens the support window by depending on other compatibility packages.
Problems it solves
- use newer base functions in a Haskell library that supports old GHC versions
- avoid CPP when supporting several GHC versions
- keep my Haskell package compiling on older compilers
Features
- backports newer base functions to older GHC versions
- no CPP needed in your code
- no dependencies and no orphan instances
- base-compat-batteries for a wider support window
Limitations
Alternatives
The same job
These do what base-compat does.
- base-orphans Newer base instances for older GHC versions
- extra Extra functions for the standard Haskell libraries
- transformers-compat Compatibility shim for Haskell's transformers library
- relude Safe, fast alternative Prelude for Haskell
- MissingH A large utility library for Haskell
