map -package:base -is:exact -is:exact -package:text -package:containers -package:dlist -package:Cabal is:module -package:ctrie -package:rerebase -package:genvalidity-containers -package:validity-containers -package:opaleye
Contains implementation of polymorphic type classes for data types
Set and
Map.
Strict
Map. Import as:
import qualified RIO.Map as Map
This module does not export any partial or unchecked functions. For
those, see
RIO.Map.Partial and
RIO.Map.Unchecked
Instances to convert between Map and association list.
Copyright (C) 2009-2011 John Goerzen
jgoerzen@complete.org
All rights reserved.
For license and copyright information, see the file LICENSE
Map type used to represent records and unions
TOML-specific combinators for converting between TOML and Haskell
Map-like data types.
There are two way to represent map-like structures with the
tomland library.
- Map structure with the key and value represented as key-value
pairs:
foo = [ {myKey = "name", myVal = 42} , {myKey =
"otherName", myVal = 100} ]
- Map structure as a table with the TOML key as the map
key:
[foo] name = 42 otherName = 100
You can find both types of the codecs in this module for different
map-like structures. See the following table for the heads up:
TODO: table
Note: in case of the missing key on the
TOML side an
empty map structure is returned.
This module defines finite maps where the key and value types are
parameterized by an arbitrary kind.
Some code was adapted from containers.
Bijections via strict maps.
Patches of this type consist only of insertions (including overwrites)
and deletions.
Utilities for mapping or transforming
Exprs.
This module provides a lossless way to do diffing between two
Maps, and ways to manipulate the diffs.
A slightly less trivial implementation of range sets.
This is nearly identical to
Data.RangeSet.List except for some
important performance differences:
- Most query functions in this module are O(log n) rather
than O(n), so may be much faster.
- Most composition functions have the same time complexity but a
higher constant, so may be somewhat slower.
If you're mainly calling
member, you should consider using this
module, but if you're calling
union,
deleteRange, and
other range manipulation functions as often as querying, you might
stick with the list implementation.
This module is intended to be imported qualified, to avoid name
clashes with Prelude functions, e.g.
import Data.RangeSet.Map (RSet)
import qualified Data.RangeSet.Map as RSet
The implementation of
RSet is based on
Data.Map.Strict.