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.
adjust :: Ord k => (a -> a) -> k -> IntervalMap k a -> IntervalMap k aIntervalMap Data.IntervalMap.Lazy O(log n). Update a value at a specific key with the result of the provided function. When the key is not a member of the map, the original map is returned.
adjustWithKey :: Ord k => (k -> a -> a) -> k -> IntervalMap k a -> IntervalMap k aIntervalMap Data.IntervalMap.Lazy O(log n). Adjust a value at a specific key. When the key is not a member of the map, the original map is returned.
adjust :: Ord k => (a -> a) -> k -> IntervalMap k a -> IntervalMap k aIntervalMap Data.IntervalMap.Strict O(log n). Update a value at a specific key with the result of the provided function. When the key is not a member of the map, the original map is returned.
adjustWithKey :: Ord k => (k -> a -> a) -> k -> IntervalMap k a -> IntervalMap k aIntervalMap Data.IntervalMap.Strict O(log n). Adjust a value at a specific key. When the key is not a member of the map, the original map is returned.
-
LPFP-core LPFPCore.SimpleVec No documentation available.
adjustMap :: IsMap map => (MapValue map -> MapValue map) -> ContainerKey map -> map -> mapclassy-prelude-yesod ClassyPrelude.Yesod Apply a function to the value of a given key. Returns the input map when the key-value pair does not exist.
-
classy-prelude-yesod ClassyPrelude.Yesod Equivalent to adjustMap, but the function accepts the key, as well as the previous value.
-
classy-prelude-yesod ClassyPrelude.Yesod Same as belongsTo, but uses getJust and therefore is similarly unsafe.
catchJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> m a -> (b -> m a) -> m aclassy-prelude-yesod ClassyPrelude.Yesod catchJust is like catch but it takes an extra argument which is an exception predicate, a function which selects which type of exceptions we're interested in.
-
classy-prelude-yesod ClassyPrelude.Yesod 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.