Hoogle Search

Within LTS Haskell 24.19 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. rmapMethod :: RecMapMethod c f ts => (forall (a :: u) . c (PayloadType f a) => f a -> g a) -> Rec f ts -> Rec g ts

    vinyl Data.Vinyl

    No documentation available.

  2. rmapMethodF :: forall c (f :: Type -> Type) (ts :: [Type]) . (Functor f, FieldPayload f ~ 'FieldId, RecMapMethod c f ts) => (forall a . c a => a -> a) -> Rec f ts -> Rec f ts

    vinyl Data.Vinyl

    Apply a typeclass method to each field of a Rec f ts using the Functor instance for f to lift the function into the functor. This is a commonly-used specialization of rmapMethod composed with fmap.

  3. class RecMapMethod (c :: Type -> Constraint) (f :: u -> Type) (ts :: [u])

    vinyl Data.Vinyl.Class.Method

    Apply a typeclass method to each field of a Rec where the class constrains the index of the field, but not its interpretation functor.

  4. class RecMapMethod1 (c :: Type -> Constraint) (f :: u -> Type) (ts :: [u])

    vinyl Data.Vinyl.Class.Method

    Apply a typeclass method to each field of a Rec where the class constrains the field when considered as a value interpreted by the record's interpretation functor.

  5. rmapMethod :: RecMapMethod c f ts => (forall (a :: u) . c (PayloadType f a) => f a -> g a) -> Rec f ts -> Rec g ts

    vinyl Data.Vinyl.Class.Method

    No documentation available.

  6. rmapMethod1 :: RecMapMethod1 c f ts => (forall (a :: u) . c (f a) => f a -> g a) -> Rec f ts -> Rec g ts

    vinyl Data.Vinyl.Class.Method

    No documentation available.

  7. rmapMethodF :: forall c (f :: Type -> Type) (ts :: [Type]) . (Functor f, FieldPayload f ~ 'FieldId, RecMapMethod c f ts) => (forall a . c a => a -> a) -> Rec f ts -> Rec f ts

    vinyl Data.Vinyl.Class.Method

    Apply a typeclass method to each field of a Rec f ts using the Functor instance for f to lift the function into the functor. This is a commonly-used specialization of rmapMethod composed with fmap.

  8. imapMaybe :: FilterableWithIndex i t => (i -> a -> Maybe b) -> t a -> t b

    witherable Witherable

    No documentation available.

  9. cmapM :: Monad m => (a -> m b) -> LogAction m b -> LogAction m a

    co-log-core Colog.Core.Action

    cmapM combinator is similar to cmap but allows to call monadic functions (functions that require extra context) to extend consumed value. Consider the following example. You have this logging record:

    data LogRecord = LR
    { lrTime    :: UTCTime
    , lrMessage :: Text
    }
    
    and you also have logging consumer inside IO for such record:
    logRecordAction :: LogAction IO LogRecord
    
    But you need to return consumer only for Text messages:
    logTextAction :: LogAction IO Text
    
    If you have function that can extend Text to LogRecord like the function below:
    withTime :: Text -> IO LogRecord
    withTime msg = do
    time <- getCurrentTime
    pure (LR time msg)
    
    you can achieve desired behavior with cmapM in the following way:
    logTextAction :: LogAction IO Text
    logTextAction = cmapM withTime myAction
    

  10. cmapMaybe :: forall (m :: Type -> Type) a b . Applicative m => (a -> Maybe b) -> LogAction m b -> LogAction m a

    co-log-core Colog.Core.Action

    cmap for convertions that may fail

Page 74 of many | Previous | Next