[Haskell-cafe] IO platform for testing
yin at atom.sk
Sat Jul 16 11:19:26 EDT 2005
first I have to apologise for my English.
So, I don't fully understand haskells IO, but I need some testing 'main'
./bundle01 <cmd> <arg1> <arg2> ...
I more apoarches, but no one worked. Now I tried this:
m01_mod :: Int -> Int -> Int
b01_mod a b = a mod b
main = do
(cmd:ss) <- getArgs
if (cmd == "mod") then do
show (b01_mod (read (ss!!1)) (read (ss!!2)))
Please, send me somethung like this (I need to understand it). I need
runing more <cmd>s and with various argument counts and types. All
functions "in a bundle" should be in one file.
Thanks to you all :)
Matej 'Yin' Gagyi
More information about the Haskell-Cafe