| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
BasePrelude
Contents
Description
This module reexports most of the definitions from the "base" package, which are meant to be imported unqualified.
For details check out the source.
Reimplementations of functions presented in versions of "base" newer than 4.5
Data.Bool
bool :: a -> a -> Bool -> a Source
Case analysis for the Bool type.
bool a b p evaluates to a when p is False, and evaluates to b
when p is True.
Debug.Trace
traceShowId :: Show a => a -> a Source
Like traceShow but returns the shown value instead of a third value.
traceShowM :: (Show a, Monad m) => a -> m () Source
Data.Ord
The Down type allows you to reverse sort order conveniently. A value of type
contains a value of type Down aa (represented as ).
If Down aa has an instance associated with it then comparing two
values thus wrapped will give you the opposite of their normal sort order.
This is particularly useful when sorting in generalised list comprehensions,
as in: Ordthen sortWith by Down x
Constructors
| Down a |