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
throwError :: Err -> IO a Source #
Throw error to IO