LangToGroup-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Containers.IsoMap.Iso

Description

Module Iso include class Iso for realisation of isomorphism.

Documentation

class Iso i a b | i a -> b, i b -> a where Source #

Minimal complete definition

values, member, filter, insert, delete, toMap, fromList, fromList', toList, singleton

Methods

(~$) :: MonadFail m => i -> a -> m b infixr 1 Source #

(~&) :: MonadFail m => a -> i -> m b infixr 1 Source #

values :: i -> Set a Source #

member :: a -> i -> Bool Source #

filter :: (a -> Bool) -> i -> i Source #

insert :: MonadFail m => (a, b) -> i -> m i Source #

delete :: a -> i -> i Source #

toMap :: i -> Map a b Source #

fromList :: MonadFail m => [(a, b)] -> m i Source #

fromList' :: [(a, b)] -> i Source #

toList :: i -> [(a, b)] Source #

singleton :: a -> b -> i Source #

Instances

Instances details
(Ord a, Ord b) => Iso (IsoMap a b) b a Source # 
Instance details

Defined in Containers.IsoMap

Methods

(~$) :: MonadFail m => IsoMap a b -> b -> m a Source #

(~&) :: MonadFail m => b -> IsoMap a b -> m a Source #

values :: IsoMap a b -> Set b Source #

member :: b -> IsoMap a b -> Bool Source #

filter :: (b -> Bool) -> IsoMap a b -> IsoMap a b Source #

insert :: MonadFail m => (b, a) -> IsoMap a b -> m (IsoMap a b) Source #

delete :: b -> IsoMap a b -> IsoMap a b Source #

toMap :: IsoMap a b -> Map b a Source #

fromList :: MonadFail m => [(b, a)] -> m (IsoMap a b) Source #

fromList' :: [(b, a)] -> IsoMap a b Source #

toList :: IsoMap a b -> [(b, a)] Source #

singleton :: b -> a -> IsoMap a b Source #

(Ord a, Ord b) => Iso (IsoMap a b) a b Source # 
Instance details

Defined in Containers.IsoMap

Methods

(~$) :: MonadFail m => IsoMap a b -> a -> m b Source #

(~&) :: MonadFail m => a -> IsoMap a b -> m b Source #

values :: IsoMap a b -> Set a Source #

member :: a -> IsoMap a b -> Bool Source #

filter :: (a -> Bool) -> IsoMap a b -> IsoMap a b Source #

insert :: MonadFail m => (a, b) -> IsoMap a b -> m (IsoMap a b) Source #

delete :: a -> IsoMap a b -> IsoMap a b Source #

toMap :: IsoMap a b -> Map a b Source #

fromList :: MonadFail m => [(a, b)] -> m (IsoMap a b) Source #

fromList' :: [(a, b)] -> IsoMap a b Source #

toList :: IsoMap a b -> [(a, b)] Source #

singleton :: a -> b -> IsoMap a b Source #