Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
class StrictContainer t where Source
For convenience, we export the names of the lazy types too
data Maybe a :: * -> *
The Maybe
type encapsulates an optional value. A value of type
either contains a value of type Maybe
aa
(represented as
),
or it is empty (represented as Just
aNothing
). Using Maybe
is a good way to
deal with errors or exceptional cases without resorting to drastic
measures such as error
.
The Maybe
type is also a monad. It is a simple kind of error
monad, where all errors are represented by Nothing
. A richer
error monad can be built using the Either
type.
data Map k a :: * -> * -> *
A Map from keys k
to values a
.
Functor (Map k) | |
Foldable (Map k) | |
Traversable (Map k) | |
StrictContainer (Map k) | |
(Eq k, Eq a) => Eq (Map k a) | |
(Eq k, Eq v) => Eq (Strict (Map k) v) | |
(Data k, Data a, Ord k) => Data (Map k a) | |
(Ord k, Ord v) => Ord (Map k v) | |
(Ord k, Read k, Read e) => Read (Map k e) | |
(Show k, Show a) => Show (Map k a) | |
(Show k, Show v) => Show (Strict (Map k) v) | |
ToJSON v => ToJSON (Map String v) | |
ToJSON v => ToJSON (Map Text v) | |
ToJSON v => ToJSON (Map Text v) | |
FromJSON v => FromJSON (Map String v) | |
FromJSON v => FromJSON (Map Text v) | |
FromJSON v => FromJSON (Map Text v) | |
Ord k => Monoid (Map k v) | |
(Binary k, Binary e) => Binary (Map k e) | |
(Ord k, Binary k, Binary v) => Binary (Strict (Map k) v) | |
(Ord k, Serialize k, Serialize e) => Serialize (Map k e) | |
(NFData k, NFData a) => NFData (Map k a) | |
(PrettyVal k, PrettyVal a) => PrettyVal (Map k a) | |
(PrettyVal k, PrettyVal v) => PrettyVal (Strict (Map k) v) | |
Ord k => Semigroup (Map k v) | |
Typeable (* -> * -> *) Map | |
data Strict (Map k) = StrictMap {} |
data IntMap a :: * -> *
A map of integers to values a
.
Functor IntMap | |
Foldable IntMap | |
Traversable IntMap | |
StrictContainer IntMap | |
Eq a => Eq (IntMap a) | |
Data a => Data (IntMap a) | |
Ord a => Ord (IntMap a) | |
Read e => Read (IntMap e) | |
Show a => Show (IntMap a) | |
ToJSON a => ToJSON (IntMap a) | |
FromJSON a => FromJSON (IntMap a) | |
Monoid (IntMap a) | |
Binary e => Binary (IntMap e) | |
Serialize e => Serialize (IntMap e) | |
NFData a => NFData (IntMap a) | |
PrettyVal a => PrettyVal (IntMap a) | |
Semigroup (IntMap v) | |
Eq v => Eq (Strict IntMap v) | |
Show v => Show (Strict IntMap v) | |
Binary v => Binary (Strict IntMap v) | |
PrettyVal v => PrettyVal (Strict IntMap v) | |
Typeable (* -> *) IntMap | |
data Strict IntMap = StrictIntMap {
|
data Trie a :: * -> *
A map from ByteString
s to a
. For all the generic functions,
note that tries are strict in the Maybe
but not in a
.
The Monad
instance is strange. If a key k1
is a prefix of
other keys, then results from binding the value at k1
will
override values from longer keys when they collide. If this is
useful for anything, or if there's a more sensible instance, I'd
be curious to know.
Monad Trie | |
Functor Trie | |
Applicative Trie | |
Foldable Trie | |
Traversable Trie | |
StrictContainer Trie | |
Eq a => Eq (Trie a) | |
Show a => Show (Trie a) | |
Monoid a => Monoid (Trie a) | |
Binary a => Binary (Trie a) | |
PrettyVal a => PrettyVal (Trie a) | |
Eq a => Eq (Strict Trie a) | |
Show a => Show (Strict Trie a) | |
PrettyVal a => PrettyVal (Strict Trie a) | |
data Strict Trie = StrictTrie {
|