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.
adjustUDFM :: Uniquable key => (elt -> elt) -> UniqDFM key elt -> key -> UniqDFM key eltghc GHC.Types.Unique.DFM Apply a function to a particular element
adjustUFM :: Uniquable key => (elt -> elt) -> UniqFM key elt -> key -> UniqFM key eltghc GHC.Types.Unique.FM No documentation available.
adjustUniqMap :: Uniquable k => (a -> a) -> UniqMap k a -> k -> UniqMap k aghc GHC.Types.Unique.Map No documentation available.
unitEnv_adjust :: (v -> v) -> UnitEnvGraphKey -> UnitEnvGraph v -> UnitEnvGraph vghc GHC.Unit.Env No documentation available.
catchJust :: Exception e => (e -> Maybe b) -> IO a -> (b -> IO a) -> IO aghc GHC.Utils.Exception No documentation available.
handleJust :: Exception e => (e -> Maybe b) -> (b -> IO a) -> IO a -> IO aghc GHC.Utils.Exception No documentation available.
tryJust :: Exception e => (e -> Maybe b) -> IO a -> IO (Either b a)ghc GHC.Utils.Exception No documentation available.
onJust :: b -> Maybe a -> (a -> b) -> bghc GHC.Utils.Misc onJust x m f applies f to the value inside the Just or returns the default.
-
persistent Database.Persist.Class Same as belongsTo, but uses getJust and therefore is similarly unsafe.
-
persistent Database.Persist.Class 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.