]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Postprocess.hs
StatusCode is now a type class, not an algebraic data type.
[Lucu.git] / Network / HTTP / Lucu / Postprocess.hs
index 6735652d6a5656410c6cc5ebfcdc922c11184761..29c3c5167cb375accbce646038b110a4a0b0b601 100644 (file)
@@ -47,14 +47,14 @@ abortOnCertainConditions (NI {..})
                    $ A.toAsciiBuilder "Inappropriate status code for a response: "
                    ⊕ printStatusCode resStatus
 
-               when ( resStatus ≡ MethodNotAllowed ∧
-                      hasHeader "Allow" res        )
+               when ( toStatusCode resStatus ≡ Just MethodNotAllowed ∧
+                      hasHeader "Allow" res )
                    $ abort'
                    $ A.toAsciiBuilder "The status was "
                    ⊕ printStatusCode resStatus
                    ⊕ A.toAsciiBuilder " but no \"Allow\" header."
 
-               when ( resStatus ≢ NotModified  ∧
+               when ( toStatusCode resStatus ≢ Just NotModified  ∧
                       isRedirection resStatus ∧
                       hasHeader "Location" res )
                    $ abort'