Safe Haskell | None |
---|---|
Language | Haskell2010 |
Specification for an API endpoint as a composition of Request and Response components at the Type level.
API type
Req [ReqContent a] | |
Res [ResContent a] |
API GADT as a singleton.
SingI instance for API types
API Type combinators
type (:=) (a :: Symbol) (b :: k2) = '(a, b) infixr 1 Source #
For representing type level tuples where first value is a Symbol
>>>
import Hreq.Core.API
>>>
import GHC.Generics
>>>
import Data.Aeson
>>>
data User = User deriving (Show)
>>>
instance ToJSON User where toJSON = undefined
>>>
instance FromJSON User where parseJSON = undefined