morley-1.18.0: Developer tools for the Michelson Language
Safe HaskellSafe-Inferred
LanguageHaskell2010

Morley.Util.Bimap

Contents

Synopsis

Documentation

newtype Bimap a b Source #

Constructors

Bimap 

Fields

Instances

Instances details
(Ord a, Ord b, FromJSON a, FromJSON b) => FromJSON (Bimap a b) Source # 
Instance details

Defined in Morley.Util.Bimap

Methods

parseJSON :: Value -> Parser (Bimap a b) #

parseJSONList :: Value -> Parser [Bimap a b] #

(ToJSON a, ToJSON b) => ToJSON (Bimap a b) Source # 
Instance details

Defined in Morley.Util.Bimap

Methods

toJSON :: Bimap a b -> Value #

toEncoding :: Bimap a b -> Encoding #

toJSONList :: [Bimap a b] -> Value #

toEncodingList :: [Bimap a b] -> Encoding #

(Ord a, Ord b) => IsList (Bimap a b) Source # 
Instance details

Defined in Morley.Util.Bimap

Associated Types

type Item (Bimap a b) #

Methods

fromList :: [Item (Bimap a b)] -> Bimap a b #

fromListN :: Int -> [Item (Bimap a b)] -> Bimap a b #

toList :: Bimap a b -> [Item (Bimap a b)] #

(Show a, Show b) => Show (Bimap a b) Source # 
Instance details

Defined in Morley.Util.Bimap

Methods

showsPrec :: Int -> Bimap a b -> ShowS #

show :: Bimap a b -> String #

showList :: [Bimap a b] -> ShowS #

(Eq a, Eq b) => Eq (Bimap a b) Source # 
Instance details

Defined in Morley.Util.Bimap

Methods

(==) :: Bimap a b -> Bimap a b -> Bool #

(/=) :: Bimap a b -> Bimap a b -> Bool #

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

Defined in Morley.Util.Bimap

Methods

compare :: Bimap a b -> Bimap a b -> Ordering #

(<) :: Bimap a b -> Bimap a b -> Bool #

(<=) :: Bimap a b -> Bimap a b -> Bool #

(>) :: Bimap a b -> Bimap a b -> Bool #

(>=) :: Bimap a b -> Bimap a b -> Bool #

max :: Bimap a b -> Bimap a b -> Bimap a b #

min :: Bimap a b -> Bimap a b -> Bimap a b #

(Ord k, Ord v) => At (Bimap k v) Source #

Left-biased At instance. It assumes the left value a is the key (just like the At (Map k v) instance).

To flip this assumption, use the flipped optic.

Instance details

Defined in Morley.Util.Bimap

Methods

at :: Index (Bimap k v) -> Lens' (Bimap k v) (Maybe (IxValue (Bimap k v))) #

(Ord k, Ord v) => Ixed (Bimap k v) Source #

Left-biased Ixed instance. It assumes the left value a is the key (just like the Ix (Map k v) instance).

To flip this assumption, use the flipped optic.

Instance details

Defined in Morley.Util.Bimap

Methods

ix :: Index (Bimap k v) -> Traversal' (Bimap k v) (IxValue (Bimap k v)) #

type Item (Bimap a b) Source # 
Instance details

Defined in Morley.Util.Bimap

type Item (Bimap a b) = Item (Bimap a b)
type Index (Bimap k _1) Source # 
Instance details

Defined in Morley.Util.Bimap

type Index (Bimap k _1) = k
type IxValue (Bimap _1 v) Source # 
Instance details

Defined in Morley.Util.Bimap

type IxValue (Bimap _1 v) = v

Optics

flipped :: Iso (Bimap a1 b1) (Bimap a2 b2) (Bimap b1 a1) (Bimap b2 a2) Source #

Isomorphism between Bimap a b and Bimap b a.