morley-1.12.0: Developer tools for the Michelson Language
Safe HaskellNone
LanguageHaskell2010

Util.Named

Description

Additional functionality for named package.

Synopsis

Documentation

type (:!) (name :: Symbol) a = NamedF Identity a name #

Infix notation for the type of a named parameter.

type (:?) (name :: Symbol) a = NamedF Maybe a name #

Infix notation for the type of an optional named parameter.

(.!) :: Name name -> a -> NamedF Identity a name Source #

(.?) :: Name name -> Maybe a -> NamedF Maybe a name Source #

(<.!>) :: Functor m => Name name -> m a -> m (NamedF Identity a name) infixl 4 Source #

(<.?>) :: Functor m => Name name -> m (Maybe a) -> m (NamedF Maybe a name) infixl 4 Source #

type family ApplyNamedFunctor (f :: Type -> Type) (a :: Type) where ... Source #

type family NamedInner (n :: Type) where ... Source #

Equations

NamedInner (NamedF f a _) = ApplyNamedFunctor f a 

class KnownNamedFunctor f where Source #

Methods

namedL :: Label name -> Iso' (NamedF f a name) (ApplyNamedFunctor f a) Source #

Isomorphism between named entity and the entity itself.

Instances

Instances details
KnownNamedFunctor Maybe Source # 
Instance details

Defined in Util.Named

Methods

namedL :: forall (name :: Symbol) a. Label name -> Iso' (NamedF Maybe a name) (ApplyNamedFunctor Maybe a) Source #

KnownNamedFunctor Identity Source # 
Instance details

Defined in Util.Named

Methods

namedL :: forall (name :: Symbol) a. Label name -> Iso' (NamedF Identity a name) (ApplyNamedFunctor Identity a) Source #

Orphan instances

Eq (f a) => Eq (NamedF f a name) Source # 
Instance details

Methods

(==) :: NamedF f a name -> NamedF f a name -> Bool #

(/=) :: NamedF f a name -> NamedF f a name -> Bool #

(Typeable f, Typeable a, KnownSymbol name, Data (f a)) => Data (NamedF f a name) Source # 
Instance details

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NamedF f a name -> c (NamedF f a name) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (NamedF f a name) #

toConstr :: NamedF f a name -> Constr #

dataTypeOf :: NamedF f a name -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (NamedF f a name)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (NamedF f a name)) #

gmapT :: (forall b. Data b => b -> b) -> NamedF f a name -> NamedF f a name #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NamedF f a name -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NamedF f a name -> r #

gmapQ :: (forall d. Data d => d -> u) -> NamedF f a name -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> NamedF f a name -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> NamedF f a name -> m (NamedF f a name) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NamedF f a name -> m (NamedF f a name) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NamedF f a name -> m (NamedF f a name) #

Ord (f a) => Ord (NamedF f a name) Source # 
Instance details

Methods

compare :: NamedF f a name -> NamedF f a name -> Ordering #

(<) :: NamedF f a name -> NamedF f a name -> Bool #

(<=) :: NamedF f a name -> NamedF f a name -> Bool #

(>) :: NamedF f a name -> NamedF f a name -> Bool #

(>=) :: NamedF f a name -> NamedF f a name -> Bool #

max :: NamedF f a name -> NamedF f a name -> NamedF f a name #

min :: NamedF f a name -> NamedF f a name -> NamedF f a name #

(Show a, KnownSymbol name) => Show (NamedF Identity a name) Source # 
Instance details

Methods

showsPrec :: Int -> NamedF Identity a name -> ShowS #

show :: NamedF Identity a name -> String #

showList :: [NamedF Identity a name] -> ShowS #

ToJSON a => ToJSON (NamedF Maybe a name) Source # 
Instance details

Methods

toJSON :: NamedF Maybe a name -> Value #

toEncoding :: NamedF Maybe a name -> Encoding #

toJSONList :: [NamedF Maybe a name] -> Value #

toEncodingList :: [NamedF Maybe a name] -> Encoding #

ToJSON a => ToJSON (NamedF Identity a name) Source # 
Instance details

FromJSON a => FromJSON (NamedF Maybe a name) Source # 
Instance details

Methods

parseJSON :: Value -> Parser (NamedF Maybe a name) #

parseJSONList :: Value -> Parser [NamedF Maybe a name] #

FromJSON a => FromJSON (NamedF Identity a name) Source # 
Instance details

(KnownSymbol name, Buildable (f a)) => Buildable (NamedF f a name) Source # 
Instance details

Methods

build :: NamedF f a name -> Builder #