mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-23 05:13:48 +00:00
This was a seperate repository in CVS and so it missed the conversion.
benchmarks/
As above.
25 lines
501 B
Haskell
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
|
|
|