Files
mercury/benchmarks/progs/pic/haskell/Main.hs
Paul Bone ea06fd8cde Add the benchmarks directory into the main Mercury repository.
This was a seperate repository in CVS and so it missed the conversion.

benchmarks/
    As above.
2013-01-04 12:13:53 +11:00

25 lines
501 B
Haskell

--
-- Patricia Fasel
-- Los Alamos National Laboratory
-- 1990 August
--
import Pic
import PicType -- added by partain
import System.IO(hPutStr,stderr)
import System.Environment(getArgs,getProgName)
usage = do
progname <- getProgName
putStrLn ("usage: " ++ progname ++ " num")
main = do
cmdline <- getArgs
case cmdline of
[numstr] -> do
let (nPart, rest) = (head (reads numstr)) :: (Int, String)
putStrLn (pic nPart)
_ -> do
usage