chr-data-0.1.0.1: Datatypes required for chr library

Safe HaskellSafe
LanguageHaskell2010

CHR.Data.AssocL

Contents

Synopsis

Assoc list

type Assoc k v = (k, v) Source #

type AssocL k v = [Assoc k v] Source #

assocLMapElt :: (v -> v') -> AssocL k v -> AssocL k v' Source #

assocLMapKey :: (k -> k') -> AssocL k v -> AssocL k' v Source #

assocLElts :: AssocL k v -> [v] Source #

assocLKeys :: AssocL k v -> [k] Source #

assocLGroupSort :: Ord k => AssocL k v -> AssocL k [v] Source #

assocLMapUnzip :: AssocL k (v1, v2) -> (AssocL k v1, AssocL k v2) Source #

ppAssocL :: (PP k, PP v) => AssocL k v -> PP_Doc Source #

ppAssocL' :: (PP k, PP v, PP s) => ([PP_Doc] -> PP_Doc) -> s -> AssocL k v -> PP_Doc Source #

ppAssocLV :: (PP k, PP v) => AssocL k v -> PP_Doc Source #

ppAssocLH :: (PP k, PP v) => AssocL k v -> PP_Doc Source #

ppCurlysAssocL :: (k -> PP_Doc) -> (v -> PP_Doc) -> AssocL k v -> PP_Doc Source #

intended for parsing

Utils

combineToDistinguishedElts :: Eq k => [AssocL k v] -> [AssocL k v] Source #

Combine [[x1..xn],..,[y1..ym]] to [[x1..y1],[x2..y1],..,[xn..ym]]. Each element [xi..yi] is distinct based on the the key k in xi==(k,_)