Is there a platform function that will do the following?
convertBase :: (Num a, Num b) => Int -> Int -> [a] -> [b]
Convert a number
The closest thing in the haskell platform is from module Numeric:
readInt :: Num a => a -> (Char -> Bool) -> (Char -> Int) -> ReadS a
showIntAtBase :: Integral a => a -> (Int -> Char) -> a -> ShowS
fromBase :: Int -> String -> Int
fromBase base = fst . head . readInt base (( Int -> String
toBase base num = showIntAtBase base intToDigit num ""
fromBaseToBase :: Int -> Int -> String -> String
fromBaseToBase from to = toBase to . fromBase from