-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | bijections with multiple implementations. -- @package bimaps @version 0.0.0.2 module Data.Bijection.Class class Bijection z where type family ContL z :: * type family ContR z :: * type family ElemL z :: * type family ElemR z :: * memberL = (maybe False (const True) .) . lookupL memberR = (maybe False (const True) .) . lookupR contL :: Bijection z => z -> ContL z contR :: Bijection z => z -> ContR z memberL :: Bijection z => z -> ElemL z -> Bool memberR :: Bijection z => z -> ElemR z -> Bool lookupL :: Bijection z => z -> ElemL z -> Maybe (ElemR z) lookupR :: Bijection z => z -> ElemR z -> Maybe (ElemL z) empty :: Bijection z => z null :: Bijection z => z -> Bool size :: Bijection z => z -> Int fromList :: Bijection z => [(ElemL z, ElemR z)] -> z toList :: Bijection z => z -> [(ElemL z, ElemR z)] insert :: Bijection z => z -> (ElemL z, ElemR z) -> z deleteByL :: Bijection z => z -> ElemL z -> z deleteByR :: Bijection z => z -> ElemR z -> z findWithDefaultL :: Bijection z => ElemR z -> z -> ElemL z -> ElemR z findWithDefaultR :: Bijection z => ElemL z -> z -> ElemR z -> ElemL z module Data.Bijection.Hash -- | A bijection between values of type l and type r. data Bimap l r instance (Eq l, Eq r, Read l, Read r, Hashable l, Hashable r) => Read (Bimap l r) instance (Show l, Show r) => Show (Bimap l r) instance (Eq l, Eq r) => Eq (Bimap l r) instance Generic (Bimap l r) instance Datatype D1Bimap instance Constructor C1_0Bimap instance (FromJSON (HashMap l r), FromJSON (HashMap r l)) => FromJSON (Bimap l r) instance (ToJSON (HashMap l r), ToJSON (HashMap r l)) => ToJSON (Bimap l r) instance (Ord l, Ord r, Serialize (HashMap l r), Serialize (HashMap r l)) => Serialize (Bimap l r) instance (Binary (HashMap l r), Binary (HashMap r l)) => Binary (Bimap l r) instance (NFData l, NFData r) => NFData (Bimap l r) instance (Eq l, Eq r, Hashable l, Hashable r) => Bijection (Bimap l r) -- | Bijections via strict maps. module Data.Bijection.Map -- | A bijection between values of type l and type r, -- implemented via strict maps. data Bimap l r instance (Ord l, Ord r, Read l, Read r) => Read (Bimap l r) instance (Show l, Show r) => Show (Bimap l r) instance (Eq l, Eq r) => Eq (Bimap l r) instance Generic (Bimap l r) instance Datatype D1Bimap instance Constructor C1_0Bimap instance (FromJSON (Map l r), FromJSON (Map r l)) => FromJSON (Bimap l r) instance (ToJSON (Map l r), ToJSON (Map r l)) => ToJSON (Bimap l r) instance (Ord l, Ord r, Serialize l, Serialize r) => Serialize (Bimap l r) instance (Binary l, Binary r) => Binary (Bimap l r) instance (NFData l, NFData r) => NFData (Bimap l r) instance (Ord l, Ord r) => Bijection (Bimap l r) -- | A bijection between boxed, immutable vectors. module Data.Bijection.Vector data Bimap l r instance (Read l, Read r) => Read (Bimap l r) instance (Show l, Show r) => Show (Bimap l r) instance (Eq l, Eq r) => Eq (Bimap l r) instance Generic (Bimap l r) instance Datatype D1Bimap instance Constructor C1_0Bimap instance (FromJSON l, FromJSON r) => FromJSON (Bimap l r) instance (ToJSON l, ToJSON r) => ToJSON (Bimap l r) instance (Serialize l, Serialize r) => Serialize (Bimap l r) instance (Binary l, Binary r) => Binary (Bimap l r) instance (NFData l, NFData r) => NFData (Bimap l r) instance (Eq l, Eq r) => Bijection (Bimap l r) -- | A bijection between boxed, immutable vectors. module Data.Bijection.Vector.Unboxed data Bimap l r instance (Read l, Read r, Unbox l, Unbox r) => Read (Bimap l r) instance (Show l, Show r, Unbox l, Unbox r) => Show (Bimap l r) instance (Eq l, Eq r, Unbox l, Unbox r) => Eq (Bimap l r) instance Generic (Bimap l r) instance Datatype D1Bimap instance Constructor C1_0Bimap instance (Unbox l, Unbox r, FromJSON l, FromJSON r) => FromJSON (Bimap l r) instance (Unbox l, Unbox r, ToJSON l, ToJSON r) => ToJSON (Bimap l r) instance (Unbox l, Unbox r, Serialize l, Serialize r) => Serialize (Bimap l r) instance (Unbox l, Unbox r, Binary l, Binary r) => Binary (Bimap l r) instance (NFData l, NFData r) => NFData (Bimap l r) instance (Eq l, Eq r, Unbox l, Unbox r) => Bijection (Bimap l r) -- | A bijection between boxed, immutable vectors. module Data.Bijection.Vector.Storable data Bimap l r instance (Read l, Read r, Storable l, Storable r) => Read (Bimap l r) instance (Show l, Show r, Storable l, Storable r) => Show (Bimap l r) instance (Eq l, Eq r, Storable l, Storable r) => Eq (Bimap l r) instance Generic (Bimap l r) instance Datatype D1Bimap instance Constructor C1_0Bimap instance (Storable l, Storable r, FromJSON l, FromJSON r) => FromJSON (Bimap l r) instance (Storable l, Storable r, ToJSON l, ToJSON r) => ToJSON (Bimap l r) instance (Storable l, Storable r, Serialize l, Serialize r) => Serialize (Bimap l r) instance (Storable l, Storable r, Binary l, Binary r) => Binary (Bimap l r) instance (NFData l, NFData r) => NFData (Bimap l r) instance (Eq l, Eq r, Storable l, Storable r, Storable (l, r)) => Bijection (Bimap l r)