Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
data BoundError a b Source #
(Bounded b, Show a, Show b) => BoundError a |
Instances
Show (BoundError a b) Source # | |
Defined in Data.Conversions showsPrec :: Int -> BoundError a b -> ShowS # show :: BoundError a b -> String # showList :: [BoundError a b] -> ShowS # | |
(Typeable a, Typeable b) => Exception (BoundError a b) Source # | |
Defined in Data.Conversions toException :: BoundError a b -> SomeException # fromException :: SomeException -> Maybe (BoundError a b) # displayException :: BoundError a b -> String # |
data UserBoundError a b Source #
UserBoundError a b b |
Instances
(Show a, Show b) => Show (UserBoundError a b) Source # | |
Defined in Data.Conversions showsPrec :: Int -> UserBoundError a b -> ShowS # show :: UserBoundError a b -> String # showList :: [UserBoundError a b] -> ShowS # | |
(Show a, Show b, Typeable a, Typeable b) => Exception (UserBoundError a b) Source # | |
Defined in Data.Conversions toException :: UserBoundError a b -> SomeException # fromException :: SomeException -> Maybe (UserBoundError a b) # displayException :: UserBoundError a b -> String # |
class Conversion b a where Source #
Nothing
Instances
type ToText a = Conversion Text a Source #
convertText :: forall a b. (Conversion Text a, Conversion b Text) => a -> b Source #
convertErrorFromNatural :: forall a m. (Integral a, Bounded a, MonadError (UserBoundError Natural a) m) => Natural -> m a Source #
convertErrorFromIntegral :: forall a m. (Integral a, Bounded a, MonadError (UserBoundError a Natural) m) => a -> m Natural Source #
convertBoundedFromIntegral :: forall a b m. (Integral a, Show a, Show b, Num b, Bounded b, Conversion a b, MonadError (BoundError a b) m) => a -> m b Source #
convertEither :: forall b a e. Conversion (Either e b) a => a -> Either e b Source #
convertUnsafe :: forall b a e. (Conversion (Either e b) a, Show e) => a -> b Source #
convertThrow :: forall b a e m. (Conversion (Either e b) a, Exception e, MonadThrow m) => a -> m b Source #
convertFail :: forall b a e m. (Conversion (Either e b) a, Show e, MonadFail m) => a -> m b Source #
convertMaybe :: forall b a e. Conversion (Either e b) a => a -> Maybe b Source #