]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Abortion.hs
StatusCode is now a type class, not an algebraic data type.
[Lucu.git] / Network / HTTP / Lucu / Abortion.hs
index 40a8cb5ab0b276103a5cf9e8f4231be7d0e2e20c..064a97ebd8671232b9053a6382d93c85927df318 100644 (file)
@@ -23,22 +23,22 @@ import Prelude.Unicode
 
 -- |Construct an 'Abortion' with additional headers and an optional
 -- message text.
 
 -- |Construct an 'Abortion' with additional headers and an optional
 -- message text.
-mkAbortion ∷ StatusCode → [(CIAscii, Ascii)] → Maybe Text → Abortion
+mkAbortion ∷ StatusCode sc ⇒ sc → [(CIAscii, Ascii)] → Maybe Text → Abortion
 {-# INLINE mkAbortion #-}
 mkAbortion sc hdr msg
     = Abortion {
 {-# INLINE mkAbortion #-}
 mkAbortion sc hdr msg
     = Abortion {
-        aboStatus  = sc
+        aboStatus  = fromStatusCode sc
       , aboHeaders = toHeaders hdr
       , aboMessage = msg
       }
 
 -- |Construct an 'Abortion' without any additional headers but with a
 -- message text.
       , aboHeaders = toHeaders hdr
       , aboMessage = msg
       }
 
 -- |Construct an 'Abortion' without any additional headers but with a
 -- message text.
-mkAbortion' ∷ StatusCode → Text → Abortion
+mkAbortion' ∷ StatusCode sc ⇒ sc → Text → Abortion
 {-# INLINE mkAbortion' #-}
 mkAbortion' sc msg
     = Abortion {
 {-# INLINE mkAbortion' #-}
 mkAbortion' sc msg
     = Abortion {
-        aboStatus  = sc
+        aboStatus  = fromStatusCode sc
       , aboHeaders = (∅)
       , aboMessage = Just msg
       }
       , aboHeaders = (∅)
       , aboMessage = Just msg
       }