Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type ReadValueM a = Handler '[ThrowsFailed, ThrowsInProgress, ThrowsNotPermitted, ThrowsNotAuthorized, ThrowsNotSupported] a
- type WriteValueM a = Handler '[ThrowsFailed, ThrowsInProgress, ThrowsNotPermitted, ThrowsInvalidValueLength, ThrowsNotAuthorized, ThrowsNotSupported] a
- newtype Handler errs a = Handler {
- getReadValue :: ExceptT Text IO a
- type family IsElem (x :: k) (list :: [k]) :: Constraint where ...
- class ThrowsFailed m where
- class ThrowsInProgress m where
- class ThrowsNotPermitted m where
- class ThrowsNotAuthorized m where
- class ThrowsNotSupported m where
- class ThrowsInvalidValueLength m where
Documentation
type ReadValueM a = Handler '[ThrowsFailed, ThrowsInProgress, ThrowsNotPermitted, ThrowsNotAuthorized, ThrowsNotSupported] a Source #
type WriteValueM a = Handler '[ThrowsFailed, ThrowsInProgress, ThrowsNotPermitted, ThrowsInvalidValueLength, ThrowsNotAuthorized, ThrowsNotSupported] a Source #
newtype Handler errs a Source #
Handler | |
|
Monad (Handler errs) Source # | |
Functor (Handler errs) Source # | |
Applicative (Handler errs) Source # | |
MonadIO (Handler errs) Source # | |
IsElem ((* -> *) -> Constraint) (ThrowsInvalidValueLength *) errs => ThrowsInvalidValueLength * (Handler errs) Source # | |
IsElem ((* -> *) -> Constraint) (ThrowsNotSupported *) errs => ThrowsNotSupported * (Handler errs) Source # | |
IsElem ((* -> *) -> Constraint) (ThrowsNotAuthorized *) errs => ThrowsNotAuthorized * (Handler errs) Source # | |
IsElem ((* -> *) -> Constraint) (ThrowsNotPermitted *) errs => ThrowsNotPermitted * (Handler errs) Source # | |
IsElem ((* -> *) -> Constraint) (ThrowsInProgress *) errs => ThrowsInProgress * (Handler errs) Source # | |
IsElem ((* -> *) -> Constraint) (ThrowsFailed *) errs => ThrowsFailed * (Handler errs) Source # | |
HasWriteValue (Characteristic typ0) (Maybe (typ0 -> WriteValueM Bool)) Source # | |
HasReadValue (Characteristic typ0) (Maybe (ReadValueM typ0)) Source # | |
type family IsElem (x :: k) (list :: [k]) :: Constraint where ... Source #
Asserts that an error type is an element of a list.
example :: ThrowsFailed `IsElem` errs => Handler errs () example = errFailed "Every attempt is a wholly new start, and a different kind of failure"
Since: 0.1.2.0
class ThrowsFailed m where Source #
IsElem ((* -> *) -> Constraint) (ThrowsFailed *) errs => ThrowsFailed * (Handler errs) Source # | |
HasWriteValue (Characteristic typ0) (Maybe (typ0 -> WriteValueM Bool)) Source # | |
HasReadValue (Characteristic typ0) (Maybe (ReadValueM typ0)) Source # | |
class ThrowsInProgress m where Source #
errInProgress :: m a Source #
IsElem ((* -> *) -> Constraint) (ThrowsInProgress *) errs => ThrowsInProgress * (Handler errs) Source # | |
HasWriteValue (Characteristic typ0) (Maybe (typ0 -> WriteValueM Bool)) Source # | |
HasReadValue (Characteristic typ0) (Maybe (ReadValueM typ0)) Source # | |
class ThrowsNotPermitted m where Source #
errNotPermitted :: m a Source #
IsElem ((* -> *) -> Constraint) (ThrowsNotPermitted *) errs => ThrowsNotPermitted * (Handler errs) Source # | |
HasWriteValue (Characteristic typ0) (Maybe (typ0 -> WriteValueM Bool)) Source # | |
HasReadValue (Characteristic typ0) (Maybe (ReadValueM typ0)) Source # | |
class ThrowsNotAuthorized m where Source #
errNotAuthorized :: m a Source #
IsElem ((* -> *) -> Constraint) (ThrowsNotAuthorized *) errs => ThrowsNotAuthorized * (Handler errs) Source # | |
HasWriteValue (Characteristic typ0) (Maybe (typ0 -> WriteValueM Bool)) Source # | |
HasReadValue (Characteristic typ0) (Maybe (ReadValueM typ0)) Source # | |
class ThrowsNotSupported m where Source #
errNotSupported :: m a Source #
IsElem ((* -> *) -> Constraint) (ThrowsNotSupported *) errs => ThrowsNotSupported * (Handler errs) Source # | |
HasWriteValue (Characteristic typ0) (Maybe (typ0 -> WriteValueM Bool)) Source # | |
HasReadValue (Characteristic typ0) (Maybe (ReadValueM typ0)) Source # | |
class ThrowsInvalidValueLength m where Source #
errInvalidValueLength :: m a Source #
IsElem ((* -> *) -> Constraint) (ThrowsInvalidValueLength *) errs => ThrowsInvalidValueLength * (Handler errs) Source # | |
HasWriteValue (Characteristic typ0) (Maybe (typ0 -> WriteValueM Bool)) Source # | |