, isError
, isClientError
, isServerError
-
- , statusCode
)
where
import Data.Ascii (Ascii, AsciiBuilder)
{-# INLINE satisfy #-}
satisfy p (statusCode → (# num, _ #)) = p num
--- |@'statusCode' sc@ returns an unboxed tuple of numeric and textual
--- representation of @sc@.
statusCode ∷ StatusCode → (# Int, Ascii #)
{-# INLINEABLE statusCode #-}
statusCode GatewayTimeout = (# 504, "Gateway Timeout" #)
statusCode HttpVersionNotSupported = (# 505, "HTTP Version Not Supported" #)
statusCode InsufficientStorage = (# 507, "Insufficient Storage" #)
+-- FIXME: Textual representations should also include numbers.
+-- FIXME: StatusCode should be a type class rather than a type.