Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A typeclass-based Prelude.
Haskell
branch: master

README.md

classy-prelude

A better Prelude. Haskell's Prelude needs to maintain backwards compatibility and has many aspects that no longer represents best practice. The goals of classy-prelude are:

  • remove all partial functions
  • modernize data structures
    • generally use Text instead of String
    • encourage the use of appropriate data structures such as Vectors or HashMaps instead of always using lists and associated lists
  • reduce import lists and the need for qualified imports

classy-prelude should only be used by application developers. Library authors should consider using mono-traversable, which classy-prelude builds upon.

It is worth noting that classy-prelude is largely front-running changes that the community would like to make to the base Prelude.

mono-traversable

Most of this functionality is provided by mono-traversable. Please read the README over there. classy-prelude gets rid of the o prefix from mono-traversable functions.

Text

Lots of things use Text instead of String. Note that show returns a String. To get back Text, use tshow.

other functionality

  • exceptions package
  • system-filepath convenience functions
  • whenM, unlessM
  • hashNub and ordNub (efficient nub implementations).

Appendix

These blog posts contain some out-dated information but might be helpful

Something went wrong with that request. Please try again.