]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Utils.hs
StatusCode is now a type class, not an algebraic data type.
[Lucu.git] / Network / HTTP / Lucu / Utils.hs
index 5cee03a56f6262c7d40ab1fe7059a566236cda73..d6e571dd0fcf3ab0a2ad30c4cd1ac8188516d96c 100644 (file)
@@ -10,15 +10,12 @@ module Network.HTTP.Lucu.Utils
     , quoteStr
     , parseWWWFormURLEncoded
     , splitPathInfo
-    , show3
     , trim
     , liftCIAscii
     , liftText
     , liftMap
     )
     where
-import Blaze.ByteString.Builder.ByteString as B
-import Blaze.Text.Int as BT
 import Control.Monad
 import Data.Ascii (Ascii, CIAscii, AsciiBuilder)
 import qualified Data.Ascii as A
@@ -98,19 +95,6 @@ splitPathInfo uri
       in
         map BS.pack reqPath
 
--- |>>> show3 5
--- "005"
-show3 ∷ Integral n ⇒ n → AsciiBuilder
-{-# INLINEABLE show3 #-}
-show3 = A.unsafeFromBuilder ∘ go
-    where
-      go i | i ≥ 0 ∧ i < 10   = B.fromByteString "00" ⊕ BT.digit    i
-           | i ≥ 0 ∧ i < 100  = B.fromByteString "0"  ⊕ BT.integral i
-           | i ≥ 0 ∧ i < 1000 =                         BT.integral i
-           | otherwise        = error ("show3: the integer i must satisfy 0 <= i < 1000: " ⧺ show i)
--- FIXME: Drop this function as soon as possible, to eliminate the
--- dependency on blaze-textual.
-
 -- |>>> trim "  ab c d "
 -- "ab c d"
 trim ∷ String → String