{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NoFieldSelectors #-}
module Okapi.Record.Tree where
import Okapi.Tree (SymTree)
import Okapi.HTTP.Request.Method (Method)
import Okapi.HTTP.Request.Path (Path)
import Okapi.HTTP.Request.Query (Query)
import Okapi.HTTP.Request.Headers qualified as Request (Headers)
import Okapi.HTTP.Request.Body qualified as Request (Body)
import Okapi.HTTP.Response.Status (Status)
import Okapi.HTTP.Response.Headers qualified as Response (Headers)
import Okapi.HTTP.Response.Body qualified as Response (Body)
data Request method path query headers body = Request
{ forall method path query headers body.
Request method path query headers body -> Method method
method :: Method method
, forall method path query headers body.
Request method path query headers body -> SymTree Path path
path :: SymTree Path path
, forall method path query headers body.
Request method path query headers body -> SymTree Query query
query :: SymTree Query query
, :: SymTree Request.Headers headers
, forall method path query headers body.
Request method path query headers body -> SymTree Body body
body :: SymTree Request.Body body
}
data Response status headers body = Response
{ forall status headers body.
Response status headers body -> Status status
status :: Status status
, :: SymTree Response.Headers headers
, forall status headers body.
Response status headers body -> SymTree Body body
body :: SymTree Response.Body body
}