Safe Haskell | None |
---|---|
Language | Haskell2010 |
Additional functionality for named
package.
Synopsis
- type (:!) (name :: Symbol) a = NamedF Identity a name
- type (:?) (name :: Symbol) a = NamedF Maybe a name
- (.!) :: Name name -> a -> NamedF Identity a name
- (.?) :: Name name -> Maybe a -> NamedF Maybe a name
- (<.!>) :: Functor m => Name name -> m a -> m (NamedF Identity a name)
- (<.?>) :: Functor m => Name name -> m (Maybe a) -> m (NamedF Maybe a name)
- type family ApplyNamedFunctor (f :: Type -> Type) (a :: Type) where ...
- type family NamedInner (n :: Type) where ...
- class KnownNamedFunctor f where
- namedL :: Label name -> Iso' (NamedF f a name) (ApplyNamedFunctor f a)
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.
type family ApplyNamedFunctor (f :: Type -> Type) (a :: Type) where ... Source #
ApplyNamedFunctor Identity a = a | |
ApplyNamedFunctor Maybe a = Maybe a |
type family NamedInner (n :: Type) where ... Source #
NamedInner (NamedF f a _) = ApplyNamedFunctor f a |
class KnownNamedFunctor f where Source #
namedL :: Label name -> Iso' (NamedF f a name) (ApplyNamedFunctor f a) Source #
Isomorphism between named entity and the entity itself.
Instances
Orphan instances
Eq (f a) => Eq (NamedF f a name) Source # | |
(Typeable f, Typeable a, KnownSymbol name, Data (f a)) => Data (NamedF f a name) Source # | |
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 # | |
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 # | |
ToJSON a => ToJSON (NamedF Maybe a name) Source # | |
ToJSON a => ToJSON (NamedF Identity a name) Source # | |
FromJSON a => FromJSON (NamedF Maybe a name) Source # | |
FromJSON a => FromJSON (NamedF Identity a name) Source # | |
(KnownSymbol name, Buildable (f a)) => Buildable (NamedF f a name) Source # | |