on package:relude is:module
One is a typeclass for creating structures from a singleton
element. It has three main goals:
- Give a shorter name for the construction: uses one instead
of common singleton.
- Work with monomorphic structures like Text or
IntSet.
- Give a clearer and less scary name for cases where you can use
pure or (:[]).
This module exports all container-related stuff.
Re-exports most useful functionality from the
Control.Exception
module. Also provides some convenient utilities to throw and handle
exceptions.
This module reexports very basic and primitive functions and function
combinators.
This module contains reexports from
Data.List.NonEmpty and safe
functions to work with list type in terms of
NonEmpty.
Note, that
Relude reexports
head,
tail,
init,
last from
Data.List.NonEmpty instead of the
Data.List, so these functions are safe to use.
TODO: table
relude also provides custom type error for better experience
with transition from lists to
NonEmpty with those functions.
Let's examine the behaviour of the
relude list functions
comparing to the corresponding
base one on the example of the
head function:
TODO: table
Reexporting useful monadic stuff.
Reexports functions to work with monoids plus adds extra useful
functions.
This module implements type class which allow to have conversion to
and from
Text,
String and
ByteString types
(including both strict and lazy versions). Usually you need to export
Text modules qualified and use
pack /
unpack
functions to convert to/from
Text. Now you can just use
toText /
toString functions.