]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Response.hs
Each instances of StatusCode should not be an instance of Eq.
[Lucu.git] / Network / HTTP / Lucu / Response.hs
index 0ebfa71080647983d95d428fa6bda605239c1185..191cebd3deaa7d5191ea5b02ac2ab411b3b4ba51 100644 (file)
@@ -19,6 +19,8 @@ module Network.HTTP.Lucu.Response
     , printStatusCode
     , printResponse
 
+    , (≈)
+    , (≉)
     , isInformational
     , isSuccessful
     , isRedirection
@@ -66,11 +68,11 @@ emptyResponse sc
 resCanHaveBody ∷ Response → Bool
 {-# INLINEABLE resCanHaveBody #-}
 resCanHaveBody (Response {..})
-    | isInformational resStatus                  = False
-    | toStatusCode resStatus ≡ Just NoContent    = False
-    | toStatusCode resStatus ≡ Just ResetContent = False
-    | toStatusCode resStatus ≡ Just NotModified  = False
-    | otherwise                                  = True
+    | isInformational resStatus = False
+    | resStatus ≈ NoContent     = False
+    | resStatus ≈ ResetContent  = False
+    | resStatus ≈ NotModified   = False
+    | otherwise                 = True
 
 -- |Convert a 'Response' to 'AsciiBuilder'.
 printResponse ∷ Response → AsciiBuilder