License | MIT |
---|---|

Stability | experimental |

Safe Haskell | None |

Language | Haskell2010 |

Conversions from ixset-typed to other containers.

## Synopsis

- toHashMap :: (Hashable a, IsIndexOf a xs) => IxSet xs k -> HashMap a [k]
- toHashMapBy :: (Hashable a, IsIndexOf a xs) => IxSet xs k -> (a -> [k] -> k') -> HashMap a k'
- toHashMapByM :: (Monad m, Hashable a, IsIndexOf a xs) => IxSet xs k -> (a -> [k] -> m k') -> m (HashMap a k')
- toZipperAsc :: forall proxy ix ixs a m. (IsIndexOf ix ixs, MonadThrow m) => proxy ix -> IxSet ixs a -> m (Zipper [] a)
- toZipperDesc :: forall proxy ix ixs a m. (IsIndexOf ix ixs, MonadThrow m) => proxy ix -> IxSet ixs a -> m (Zipper [] a)
- toAscCofreeList :: (Ord b, IsIndexOf ix ixs) => (ix -> c) -> (a -> c) -> (a -> b) -> IxSet ixs a -> [Cofree [] c]
- toAscCofreeListM :: (Ord b, IsIndexOf ix ixs, Monad m) => (ix -> m c) -> (a -> c) -> (a -> b) -> IxSet ixs a -> m [Cofree [] c]
- toDescCofreeList :: (Ord b, IsIndexOf ix ixs) => (ix -> c) -> (a -> c) -> (a -> b) -> IxSet ixs a -> [Cofree [] c]
- toDescCofreeListM :: (Ord b, IsIndexOf ix ixs, Monad m) => (ix -> m c) -> (a -> c) -> (a -> b) -> IxSet ixs a -> m [Cofree [] c]

# Documentation

toHashMap :: (Hashable a, IsIndexOf a xs) => IxSet xs k -> HashMap a [k] Source #

Convert an `IxSet to a `HashMap`

.

toHashMapBy :: (Hashable a, IsIndexOf a xs) => IxSet xs k -> (a -> [k] -> k') -> HashMap a k' Source #

Convert an `IxSet`

to a `HashMap`

via a function on the index and associated list.

toHashMapByM :: (Monad m, Hashable a, IsIndexOf a xs) => IxSet xs k -> (a -> [k] -> m k') -> m (HashMap a k') Source #

Monadic variant of `toHashMapBy`

.

toZipperAsc :: forall proxy ix ixs a m. (IsIndexOf ix ixs, MonadThrow m) => proxy ix -> IxSet ixs a -> m (Zipper [] a) Source #

toZipperDesc :: forall proxy ix ixs a m. (IsIndexOf ix ixs, MonadThrow m) => proxy ix -> IxSet ixs a -> m (Zipper [] a) Source #

toAscCofreeList :: (Ord b, IsIndexOf ix ixs) => (ix -> c) -> (a -> c) -> (a -> b) -> IxSet ixs a -> [Cofree [] c] Source #

toAscCofreeListM :: (Ord b, IsIndexOf ix ixs, Monad m) => (ix -> m c) -> (a -> c) -> (a -> b) -> IxSet ixs a -> m [Cofree [] c] Source #

Monadic version of `toAscCofreeList`

.

toDescCofreeList :: (Ord b, IsIndexOf ix ixs) => (ix -> c) -> (a -> c) -> (a -> b) -> IxSet ixs a -> [Cofree [] c] Source #

toDescCofreeListM :: (Ord b, IsIndexOf ix ixs, Monad m) => (ix -> m c) -> (a -> c) -> (a -> b) -> IxSet ixs a -> m [Cofree [] c] Source #

Monadic version of `toDescCofreeList`

.