]> gitweb @ CieloNegro.org - Lucu.git/blobdiff - Network/HTTP/Lucu/Format.hs
Exodus to GHC 6.8.1
[Lucu.git] / Network / HTTP / Lucu / Format.hs
index 26319b737391e238f6e5c90ab1d9209054efa796..f017f5e6a81ef1093354d0efb9970948fae1d1a1 100644 (file)
@@ -1,5 +1,3 @@
--- #hide
-
 -- 本當にこんなものを自分で書く必要があったのだらうか。Printf は重いの
 -- で駄目だが、それ以外のモジュールを探しても見付からなかった。
 
@@ -25,9 +23,9 @@ fmtInt base upperCase minWidth pad forceSign n
         sign ++ padded
     where
       fmt' :: Int -> String
-      fmt' n
-          | n < base  = (intToChar upperCase n) : []
-          | otherwise = (intToChar upperCase $! n `mod` base) : fmt' (n `div` base)
+      fmt' m
+          | m < base  = (intToChar upperCase m) : []
+          | otherwise = (intToChar upperCase $! m `mod` base) : fmt' (m `div` base)
 
 
 fmtDec :: Int -> Int -> String
@@ -125,4 +123,5 @@ intToChar True  13 = 'D'
 intToChar False 14 = 'e'
 intToChar True  14 = 'E'
 intToChar False 15 = 'f'
-intToChar True  15 = 'F'
\ No newline at end of file
+intToChar True  15 = 'F'
+intToChar _ _ = undefined