Hoogle Search

Within LTS Haskell 24.38 (ghc-9.10.3)

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

  1. adjustUFM :: Uniquable key => (elt -> elt) -> UniqFM key elt -> key -> UniqFM key elt

    ghc GHC.Types.Unique.FM

    No documentation available.

  2. adjustUniqMap :: Uniquable k => (a -> a) -> UniqMap k a -> k -> UniqMap k a

    ghc GHC.Types.Unique.Map

    No documentation available.

  3. unitEnv_adjust :: (v -> v) -> UnitEnvGraphKey -> UnitEnvGraph v -> UnitEnvGraph v

    ghc GHC.Unit.Env

    No documentation available.

  4. catchJust :: Exception e => (e -> Maybe b) -> IO a -> (b -> IO a) -> IO a

    ghc GHC.Utils.Exception

    No documentation available.

  5. handleJust :: Exception e => (e -> Maybe b) -> (b -> IO a) -> IO a -> IO a

    ghc GHC.Utils.Exception

    No documentation available.

  6. tryJust :: Exception e => (e -> Maybe b) -> IO a -> IO (Either b a)

    ghc GHC.Utils.Exception

    No documentation available.

  7. onJust :: b -> Maybe a -> (a -> b) -> b

    ghc GHC.Utils.Misc

    onJust x m f applies f to the value inside the Just or returns the default.

  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

    persistent Database.Persist.Class

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

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

    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.

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

    persistent Database.Persist.Class

    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 |
    +----+------+-----+
    

Page 37 of many | Previous | Next