Fix "toDec" including the constructor name
This commit is contained in:
parent
9e544a64f3
commit
1effa96a17
1 changed files with 1 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ toBin a = T.reverse $ T.pack $ toBin' a
|
||||||
toBin' n = (if n `mod` 2 == 0 then '0' else '1') : toBin' (n `div` 2)
|
toBin' n = (if n `mod` 2 == 0 then '0' else '1') : toBin' (n `div` 2)
|
||||||
|
|
||||||
toDec :: (Integral a, Show a ) => a -> T.Text
|
toDec :: (Integral a, Show a ) => a -> T.Text
|
||||||
toDec = T.pack . show
|
toDec a = T.pack $ showInt a ""
|
||||||
|
|
||||||
toHex :: (Integral a, Show a) => a -> T.Text
|
toHex :: (Integral a, Show a) => a -> T.Text
|
||||||
toHex a = T.pack $ showHex a ""
|
toHex a = T.pack $ showHex a ""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue