The classy-prelude package

[Tags:library, mit, test]

Modern best practices without name collisions. No partial functions are exposed, but modern data structures are, without requiring import lists. Qualified modules also are not needed: instead operations are based on type-classes from the mono-traversable package.

[Skip to Readme]


Versions,,, 0.3.0, 0.3.1, 0.4.0,, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.6, 0.5.7, 0.5.8, 0.5.9, 0.5.10, 0.6.0,, 0.7.0, 0.8.0,, 0.8.1,, 0.8.2, 0.8.3,, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.10.0, 0.10.1, 0.10.2, 0.10.3, 0.10.4, 0.10.5, 0.11.0, 0.11.1,, 0.12.0,, 0.12.1,, 0.12.3, 0.12.4, 0.12.5,, 0.12.6, 0.12.7, 0.12.8, 1.0.0,,
Change log
Dependencies async, base (==4.*), basic-prelude (>=0.4 && <0.7), bifunctors, bytestring, chunked-data (>=0.3), containers (>=0.4.2), deepseq, dlist (>=0.7), exceptions (>=0.5), ghc-prim, hashable, lifted-async (>=0.3), lifted-base (>=0.2), monad-unlift (>=0.2), mono-traversable (>=1.0), mono-traversable-instances, mtl, mutable-containers (==0.3.*), primitive, safe-exceptions (>=0.1.1), semigroups, stm, text, time, time-locale-compat, transformers, transformers-base, unordered-containers, vector, vector-instances [details]
License MIT
Author Michael Snoyman
Stability Unknown
Category Control, Prelude
Home page
Source repository head: git clone
Uploaded Fri Sep 9 12:57:08 UTC 2016 by MichaelSnoyman
Distributions Debian:0.12.5, FreeBSD:, LTSHaskell:, NixOS:, Stackage:, Tumbleweed:0.12.8
Downloads 20551 total (210 in the last 30 days)
0 []
Status Docs pending
Build status unknown [no reports yet]


  • ClassyPrelude


Maintainer's Corner

For package maintainers and hackage trustees

Readme for classy-prelude

Readme for 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 largely front-ran changes that the community made to the base Prelude in GHC 7.10.


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.


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).

Using classy-prelude

  • use the NoImplicitPrelude extension (you can place this in your cabal file) and import ClassyPrelude
  • use base-noprelude in your project and define a Prelude module that re-exports ClassyPrelue.


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