]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Resource.hs
Code clean-up using convertible-text.
[Lucu.git] / Network / HTTP / Lucu / Resource.hs
index 852860b278489df97143eaa64ccf41a09c98a02a..8585ceaf29ce993f6a1a002ed41c61d3f5c18f1e 100644 (file)
@@ -165,7 +165,6 @@ import Data.Monoid.Unicode
 import Data.Proxy
 import Data.Tagged
 import Data.Text (Text)
-import qualified Data.Text as T
 import Data.Time
 import Data.Time.Format.HTTP
 import Network.HTTP.Lucu.Abortion
@@ -555,7 +554,7 @@ getChunks' limit = go limit (∅)
                     else
                         abort $ mkAbortion' RequestEntityTooLarge
                               $ "Request body must be smaller than "
-                              ⊕ T.pack (show limit)
+                              ⊕ cs (show limit)
                               ⊕ " bytes."
       go !n !b = do c ← getChunk $ min n BB.defaultBufferSize
                     if Strict.null c then
@@ -613,7 +612,7 @@ getForm limit
                                                   $ "Malformed boundary: " ⊕ boundary
                        case parseMultipartFormData b src of
                          Right xs → return $ map (first cs) xs
-                         Left err → abort $ mkAbortion' BadRequest $ T.pack err
+                         Left err → abort $ mkAbortion' BadRequest $ cs err
 
 -- |@'redirect' code uri@ declares the response status as @code@ and
 -- \"Location\" header field as @uri@. The @code@ must satisfy