The latest version of relude is 1.2.2.0-0.

relude

Version 0.6.0.0 revision 0 uploaded by shersh.

Package meta

Synopsis
Custom prelude from Kowainik
Description

relude is an alternative prelude library. If you find the default Prelude unsatisfying, despite its advantages, consider using relude instead.

Relude design goals

  • Avoid all partial functions (like head :: [a] -> a). The types of partial functions lie about their behavior and usage of such functions can lead to the unexpected bugs. Though you can still use some unsafe functions from Relude.Unsafe module, but they are not exported by default.

  • Type-safety. We like to make invalid states unrepresantable. And if it's possible to express this concept through the types then we will do it. Example: whenNotNull :: Applicative f => [a] -> (NonEmpty a -> f ()) -> f ()

  • Performance. Prefer Text over String, use spaceleak-free functions (like our custom sum and product), introduce {-# INLINE #-} and {-# SPECIALIZE #-} pragmas where appropriate.

  • Minimalism (low number of dependencies). We don't force users of relude to stick to some specific lens or text formatting or logging library. If possible, relude tries to depend only on boot libraies.

  • Convenience (like lifted to MonadIO functions, more reexports). Despite minimalism, we want to bring common types and functions (like containers and bytestring) into scope because they are used in almost every application anyways.

  • Provide excellent documentation.

  1. Tutorial

  2. Migration guide from Prelude

  3. Haddock for every function with examples tested by doctest).

  4. Documentation regarding internal module structure

  5. relude-specific HLint rules: .hlint.yaml

  • User-friendliness. Ability to quickly migrate to relude if you're familiar with the common libraries like text and containers. relude also makes heavy usage of custom type errors to provide better UX.

  • Exploration. Experiment with new ideas and proposals without introducing breaking changes. relude uses the approach with Extra.* modules which are not exported by default so it's quite easy to bring something new and let users decide to use it or not.

Author
Dmitrii Kovanikov, Veronika Romashkina, Stephen Diehl, Serokell
Bug reports
https://github.com/kowainik/relude/issues
Category
Prelude
Copyright
2016 Stephen Diehl, 2016-2018 Serokell, 2018-2019 Kowainik
Homepage
https://github.com/kowainik/relude
Maintainer
Kowainik <xrom.xkov@gmail.com>
Package URL
n/a
Stability
stable

Components