Hets - the Heterogeneous Tool Set

Copyright(c) Klaus Luettich and Uni Bremen 2005
LicenseGPLv2 or higher, see LICENSE.txt
MaintainerChristian.Maeder@dfki.de
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred

Common.OrderedMap

Description

Ordered maps (these keep insertion order)

ordered maps keep the ordering if converted from a list and of all insert operations which are implemented; toList uses the insertion/conversion order for the creation of the new list

Documentation

type OMap a b = Map a (ElemWOrd b)

data ElemWOrd a

Constructors

EWOrd 

Fields

order :: Int
 
ele :: a
 

Instances

null :: OMap k a -> Bool

lookup :: (Monad m, Ord k) => k -> OMap k a -> m a

insert :: Ord k => k -> a -> OMap k a -> OMap k a

map :: Ord k => (a -> b) -> OMap k a -> OMap k b

mapWithKey :: (k -> a -> b) -> OMap k a -> OMap k b

update :: Ord k => (a -> Maybe a) -> k -> OMap k a -> OMap k a

filter :: Ord k => (a -> Bool) -> OMap k a -> OMap k a

filterWithKey :: Ord k => (k -> a -> Bool) -> OMap k a -> OMap k a

partition :: Ord k => (a -> Bool) -> OMap k a -> (OMap k a, OMap k a)

partitionWithKey :: Ord k => (k -> a -> Bool) -> OMap k a -> (OMap k a, OMap k a)

fromList :: Ord k => [(k, a)] -> OMap k a

toList :: Ord k => OMap k a -> [(k, a)]

keys :: Ord k => OMap k a -> [k]

elems :: Ord k => OMap k a -> [a]