My current Haskell Prelude
Haskell
Latest commit 8422ebc Jan 22, 2017 @minad version bump 0.1.0.5
Permalink
Failed to load latest commit information.
doc add predMay and succMay Jan 22, 2017
src add predMay and succMay Jan 22, 2017
test add compat test suite Jan 9, 2017
.gitignore initial commit Dec 22, 2016
.travis.yml support ghc7 Dec 30, 2016
LICENSE initial commit Dec 22, 2016
README.md readme Jan 16, 2017
Setup.hs initial commit Dec 22, 2016
intro.cabal version bump 0.1.0.5 Jan 22, 2017
package.yaml version bump 0.1.0.5 Jan 22, 2017
stack.yaml add predMay and succMay Jan 22, 2017

README.md

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 doesn't invent its own stuff. Furthermore the Prelude is not scattered over many files. Everything is exported explicitly to improve the quality of the documentation.

List of design decisions:

  • Keep everything at one place (There are one two source files, we need Intro.Trustworthy for Safe Haskell)
  • Conservative extension over the base Prelude
  • Rely only on very common external libraries
  • Avoid writing custom functions
  • Export everything explicitly 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