3 ms·
We had QQ originally, but removed it because it wasn't extensible (you can define new expressions in the type-level DSL, but you couldn't add them to the QQ). W
by jkarni 11y ago
We had QQ originally, but removed it because it wasn't extensible (you can define new expressions in the type-level DSL, but you couldn't add them to the QQ). We've figured out how to do that now, and there's an issue someone opened asking for it back (https://github.com/haskell-servant/servant/issues/55 https://github.com/haskell-servant/servant/issues/55), so it'll probably soon return.
You do get kind of used to it, though, for what it's worth. And you can always break things up. E.g.:
type MyAPI = "users" :> Get '[JSON] User
:<|> "users" :> ReqBody '[JSON] User :> Post '[] ()
Can generally be rewritten as:
type GetUser = Get '[JSON] User
type PostUer = ReqBody '[JSON] User :> Post '[] ()
type MyAPI = "user" :> (GetUser :<|> PostUser)
etc.