Hoogle Search

Within LTS Haskell 24.28 (ghc-9.10.3)

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

  1. getJust :: forall record backend (m :: Type -> Type) . (PersistStoreRead backend, PersistRecordBackend record backend, MonadIO m) => Key record -> ReaderT backend m record

    esqueleto Database.Esqueleto.Legacy

    Same as get, but for a non-null (not Maybe) foreign key. Unsafe unless your database is enforcing that the foreign key is valid.

    Example usage

    With schema-1 and dataset-1,
    getJustSpj :: MonadIO m => ReaderT SqlBackend m User
    getJustSpj = getJust spjId
    
    spj <- getJust spjId
    
    The above query when applied on dataset-1, will get this record:
    +----+------+-----+
    | id | name | age |
    +----+------+-----+
    |  1 | SPJ  |  40 |
    +----+------+-----+
    
    getJustUnknown :: MonadIO m => ReaderT SqlBackend m User
    getJustUnknown = getJust unknownId
    
    mrx <- getJustUnknown This just throws an error.

  2. getJustEntity :: forall record backend (m :: Type -> Type) . (PersistEntityBackend record ~ BaseBackend backend, MonadIO m, PersistEntity record, PersistStoreRead backend) => Key record -> ReaderT backend m (Entity record)

    esqueleto Database.Esqueleto.Legacy

    Same as getJust, but returns an Entity instead of just the record.

    Example usage

    With schema-1 and dataset-1,
    getJustEntitySpj :: MonadIO m => ReaderT SqlBackend m (Entity User)
    getJustEntitySpj = getJustEntity spjId
    
    spjEnt <- getJustEntitySpj
    
    The above query when applied on dataset-1, will get this entity:
    +----+------+-----+
    | id | name | age |
    +----+------+-----+
    |  1 | SPJ  |  40 |
    +----+------+-----+
    

  3. holdJust :: forall (m :: Type -> Type) a . (Monad m, Data a) => Cell m (Maybe a) (Maybe a)

    essence-of-live-coding LiveCoding.Cell.Util

    Like hold, but returns Nothing until it is initialised by a Just a value.

  4. accessAndAdjust :: forall (m :: Type -> Type) s a . Monad m => (s -> a) -> (s -> s) -> Focus s m (Maybe a)

    focus Focus

    Same as all of the following expressions: f g -> fmap (fmap f) lookup <* adjust g f g -> liftStateFn (f &&& g) f g -> liftStateFn ((,) $ f * g)

  5. adjust :: forall (m :: Type -> Type) a . Monad m => (a -> a) -> Focus a m ()

    focus Focus

    Reproduces the behaviour of Data.Map.adjust.

  6. adjustM :: Monad m => (a -> m a) -> Focus a m ()

    focus Focus

    A monadic version of adjust.

  7. promotedJustDataCon :: TyCon

    ghc-lib-parser GHC.Builtin.Types

    No documentation available.

  8. mapAdjust :: (v -> v) -> Label -> LabelMap v -> LabelMap v

    ghc-lib-parser GHC.Cmm.Dataflow.Label

    No documentation available.

  9. mkJustExpr :: Type -> CoreExpr -> CoreExpr

    ghc-lib-parser GHC.Core.Make

    Makes a Just from a value of the specified type

  10. adjustDTyConEnv :: (a -> a) -> DTyConEnv a -> TyCon -> DTyConEnv a

    ghc-lib-parser GHC.Core.TyCon.Env

    No documentation available.

Page 54 of many | Previous | Next