Extra functions for the standard Haskell libraries
open sourceBSD-3-Clausefree
extra is a library of small utility functions that fill gaps in Haskell's standard libraries, by Neil Mitchell. Modules such as Data.List.Extra and Control.Monad.Extra re-export the standard module and add functions to it (concatMapM, fst3, retry and many more), so an import can simply be swapped. Where newer GHC versions added a function, extra re-exports it there and defines an equivalent for older compilers, back to GHC 7.10. The functions follow the style of the Prelude and base: mostly simple, obvious implementations rather than new types or concepts.
Problems it solves
- stop copying the same small utility functions into every Haskell project
- use newer base library functions on an older GHC
- get monadic versions of common list functions in Haskell
Features
- Data.List.Extra, Control.Monad.Extra and other modules that extend and re-export base modules
- Monadic helpers such as concatMapM and whenJust
- retry for IO actions
- Backports of newer base functions to older GHC versions (back to 7.10)
- One Extra module documents every function
Alternatives
The same job
These do what extra does.
- base-compat Newer Haskell base functions on older compilers, without CPP
- base-orphans Newer base instances for older GHC versions
- transformers-compat Compatibility shim for Haskell's transformers library
- MissingH A large utility library for Haskell
- relude Safe, fast alternative Prelude for Haskell
- rio (Haskell) A standard library and Prelude replacement for production Haskell
