Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type ScimHandler m = ExceptT ScimError m
- throwScim :: Monad m => ScimError -> ScimHandler m a
- fromScimHandler :: Monad m => (forall a. ScimError -> m a) -> forall a. ScimHandler m a -> m a
Documentation
type ScimHandler m = ExceptT ScimError m Source #
Handler type for SCIM. All errors will be thrown via ExceptT
.
fromScimHandler :: Monad m => (forall a. ScimError -> m a) -> forall a. ScimHandler m a -> m a Source #
A natural transformation for Servant handlers. To use it, you need to
provide a way to throw errors in the underlying m
monad.
We can't use something like MonadError
to throw errors in m
because
MonadError
allows only one type of errors per monad and m
might have
one already.
You can either do something custom for ScimError
, or use
scimToServantErr
.