intro

"Fixed Prelude" - Mostly total and safe, provides Text and Monad transformers

https://github.com/minad/intro#readme

Version on this page:0.1.0.10
LTS Haskell 19.33:0.9.0.0
Stackage Nightly 2022-03-17:0.9.0.0
Latest on Hackage:0.9.0.0

See all snapshots intro appears in

MIT licensed and maintained by Daniel Mendler
This version can be pinned in stack with:intro-0.1.0.10@sha256:b0be87c4f8339ad3c470e1bdca31595401142f61afc73d599943d7fe9af4eddb,3750

Module documentation for 0.1.0.10

Intro: My current Haskell Prelude

Hackage Build Status

Intro is a modern Prelude which provides safe alternatives for most of the partial functions and follows other best practices, e.g., Text is preferred over String. For String overloading the extension ‘OverloadedStrings’ should be used. Container types and Monad transformers are provided.

Most important - this Prelude tries to keep things simple. This means it just reexports from base and commonly used libraries and adds only very few additional functions.

List of design decisions:

  • Keep everything at one place (There are one two modules and Intro.Trustworthy is only there for Safe Haskell)
  • Conservative extension over the base Prelude
  • Rely only on very common external libraries
  • Avoid writing custom functions
  • Export everything explicitly to provide a stable interface and for good documentation
  • Export only total functions or provide safe alternatives (Very few exceptions like div etc.)
  • Prefer Text over String, provide ConvertibleStrings
  • Provide Monad transformers
  • Provide container types
  • Prefer generic functions
  • Debugging functions, like ‘Intro.Trustworthy.trace’ and ‘undefined’ are available but produce compile time warnings
  • Don’t provide error, only panic instead
  • Compatibility with Control.Lens