total-map alternatives and similar packages
Based on the "data" category.
Alternatively, view total-map alternatives based on common mentions on social networks and blogs.
-
proto-lens
API for protocol buffers using modern Haskell language and library patterns. -
base64-bytestring
Fast base64 encoding and decoding for Haskell. -
data-category
Library of categories, with categorical constructions on them -
interpolatedstring-perl6
QuasiQuoter for Perl6-style multi-line interpolated strings with q, qq and qc support. -
buffer-builder
Haskell library for efficiently building up buffers -
language-hcl
language-hcl contains HCL (Hashicorp Configuration Language) parsers and pretty-printers for the Haskell programming language -
finite-typelits
A type inhabited by finitely many values, indexed by type-level naturals. -
attoparsec-iteratee
An adapter to convert attoparsec Parsers into blazing-fast Iteratees -
syb-with-class
Fork of http://patch-tag.com/r/Saizan/syb-with-class -
data-structure-inferrer
A program that analyzes source code with a data-structure wildcard and suggests the right one. -
range-set-list
Memory efficient sets with continuous ranges of elements. List based implementation. -
filesystem-trees
Traverse and manipulate directories as lazy rose trees -
schedule-planner
Calculate an ideal schedule layout from a set of timeslots -
unamb-custom
Functional concurrency with unambiguous choice, using a custom scheduler. -
procrastinating-variable
Haskell values that cannot be evaluated immediately. -
resource-pool-catchio
A high-performance striped resource pooling implementation for Haskell
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of total-map or a related project?
README
The usual finite map type (Map
from Data.Map
) is not an applicative functor, as it doesn't have a pure.
Consequently, it's also not a monad.
On the other hand, we can decompose Map
into two parts: a total map, and Maybe
, i.e.,
type Map k v = TMap k (Maybe v)
The type TMap
of total maps does have Applicative
and Monad
instances, and hence this hypothetically rebuilt Map
would as well.
The idea for TMap
is introduced in the paper Denotational design with type class morphisms.
The meaning Map k v
is given by its semantic function
(!) :: Map k v -> (k -> v)
The type class morphism (TCM) principle then exactly dictates the meanings of several class instances for TMap
, including Functor
, Applicative
, Monad
, and Monoid
.
For instance, (!)
must be a monoid (homo)morphism, i.e.,
(!) mempty == mempty
(!) (s `mappend` t) == (!) s `mappend` (!) t
The current implementation of TMap
is via Data.Map
.