Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (15 sloc) 0.527 kb
import Data.Text ()
import Data.Double.Conversion.Text
import System.Environment
import System.Exit
import System.IO
main = do
args <- getArgs
case args of
("shortest":xs) -> print (map (toShortest . read) xs)
("fixed":n:xs) -> print (map (toFixed (read n) . read) xs)
("exponential":n:xs) -> print (map (toExponential (read n) . read) xs)
("precision":n:xs) -> print (map (toPrecision (read n) . read) xs)
_ -> do
hPutStrLn stderr "oops! no mode specified!"
exitWith (ExitFailure 1)
Jump to Line
Something went wrong with that request. Please try again.