The classy-prelude package

[ Tags: control, library, mit, prelude ] [ Propose Tags ]

See docs and README at http://www.stackage.org/package/classy-prelude


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.2.0.0, 0.2.0.1, 0.3.0, 0.3.1, 0.4.0, 0.4.0.1, 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.6.0.1, 0.7.0, 0.8.0, 0.8.0.1, 0.8.1, 0.8.1.1, 0.8.2, 0.8.3, 0.8.3.1, 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.11.1.1, 0.12.0, 0.12.0.1, 0.12.1, 0.12.1.1, 0.12.3, 0.12.4, 0.12.5, 0.12.5.1, 0.12.6, 0.12.7, 0.12.8, 1.0.0, 1.0.0.1, 1.0.0.2, 1.0.1, 1.0.2, 1.2.0, 1.2.0.1, 1.3.0, 1.3.1
Change log ChangeLog.md
Dependencies async, base (==4.*), basic-prelude (>=0.4), 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), say, semigroups, stm, stm-chans (>=3), text, time, time-locale-compat, transformers, transformers-base, unordered-containers, vector, vector-instances [details]
License MIT
Author Michael Snoyman
Maintainer michael@snoyman.com
Category Control, Prelude
Home page https://github.com/snoyberg/mono-traversable#readme
Bug tracker https://github.com/snoyberg/mono-traversable/issues
Source repository head: git clone https://github.com/snoyberg/mono-traversable
Uploaded Tue Dec 5 09:00:12 UTC 2017 by MichaelSnoyman
Distributions Debian:0.12.5, FreeBSD:0.12.1.1, LTSHaskell:1.2.0.1, NixOS:1.3.1, Stackage:1.3.1, Tumbleweed:1.2.0.1
Downloads 26562 total (2590 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-12-05 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for classy-prelude-1.3.1

[back to package description]

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.

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

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

Appendix

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