Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Ok a = Ok {
- getValue :: a
- newtype Err = Err {}
- err :: String -> Err
- ok :: a -> Ok a
- fromOk :: ToJSON a => Text -> Ok a -> Value
- toOk :: FromJSON a => Text -> Value -> Maybe (Ok a)
- throwError :: Err -> IO a
- type From = Int64
- type Size = Int64
- type Total = Int64
- data List a = List {}
- emptyList :: List a
- merge :: [a] -> List b -> List a
- toList :: FromJSON a => Text -> Value -> Maybe (List a)
- fromList :: ToJSON a => Text -> List a -> Value
Documentation
Make ok result look like '{"data": "data value"}'
Make error result look like '{"err": "error message"}'
Instances
Eq Err Source # | |
Ord Err Source # | |
Show Err Source # | |
ToJSON Err Source # | |
Defined in Data.Aeson.Result | |
FromJSON Err Source # | |
Exception Err Source # | |
Defined in Data.Aeson.Result toException :: Err -> SomeException # fromException :: SomeException -> Maybe Err # displayException :: Err -> String # |
throwError :: Err -> IO a Source #
Throw error to IO