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. adjust :: Ord k => (a -> a) -> k -> IntervalMap k a -> IntervalMap k a

    IntervalMap 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.

  2. adjustWithKey :: Ord k => (k -> a -> a) -> k -> IntervalMap k a -> IntervalMap k a

    IntervalMap 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.

  3. adjust :: Ord k => (a -> a) -> k -> IntervalMap k a -> IntervalMap k a

    IntervalMap 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.

  4. adjustWithKey :: Ord k => (k -> a -> a) -> k -> IntervalMap k a -> IntervalMap k a

    IntervalMap 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.

  5. MyJust :: a -> MyMaybe a

    LPFP-core LPFPCore.SimpleVec

    No documentation available.

  6. adjustMap :: IsMap map => (MapValue map -> MapValue map) -> ContainerKey map -> map -> map

    classy-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.

  7. adjustWithKey :: IsMap map => (ContainerKey map -> MapValue map -> MapValue map) -> ContainerKey map -> map -> map

    classy-prelude-yesod ClassyPrelude.Yesod

    Equivalent to adjustMap, but the function accepts the key, as well as the previous value.

  8. belongsToJust :: forall ent1 ent2 backend (m :: Type -> Type) . (PersistStoreRead backend, PersistEntity ent1, PersistRecordBackend ent2 backend, MonadIO m) => (ent1 -> Key ent2) -> ent1 -> ReaderT backend m ent2

    classy-prelude-yesod ClassyPrelude.Yesod

    Same as belongsTo, but uses getJust and therefore is similarly unsafe.

  9. catchJust :: (MonadUnliftIO m, Exception e) => (e -> Maybe b) -> m a -> (b -> m a) -> m a

    classy-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.

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

    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.

Page 157 of many | Previous | Next