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.
-
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. -
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 | +----+------+-----+
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.
-
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)
adjust :: forall (m :: Type -> Type) a . Monad m => (a -> a) -> Focus a m ()focus Focus Reproduces the behaviour of Data.Map.adjust.
adjustM :: Monad m => (a -> m a) -> Focus a m ()focus Focus A monadic version of adjust.
-
ghc-lib-parser GHC.Builtin.Types No documentation available.
mapAdjust :: (v -> v) -> Label -> LabelMap v -> LabelMap vghc-lib-parser GHC.Cmm.Dataflow.Label No documentation available.
mkJustExpr :: Type -> CoreExpr -> CoreExprghc-lib-parser GHC.Core.Make Makes a Just from a value of the specified type
adjustDTyConEnv :: (a -> a) -> DTyConEnv a -> TyCon -> DTyConEnv aghc-lib-parser GHC.Core.TyCon.Env No documentation available.