Today’s mission…
I’m stuck at home with a rotten cold, so I think I’ll try to do something useful. Specifically, how about turning the current bunch of stuff into a main program which takes an object file name as a command line parameter and loads it (in a suitably verbose style, for the now)? Apart from anything else, that would give us a more sensible basis for testing stuff. All I have to do is learn to make Haskell programs read command-line arguments, open files etc. I’ll be poking about in webland to see how do to my Haskell homework, but I’d be delighted to have someone elses’s to plagiarize…
February 2nd, 2005 at 3:35 pm
There’s a library “GetOpt” for args,
else use System.getArgs :: IO [String]
readFile :: IO String, in the Prelude
enough?
February 2nd, 2005 at 4:41 pm
Plenty.
February 2nd, 2005 at 5:14 pm
And to that end, please find
Main.lhs and
NatVec.epig.
March 8th, 2005 at 2:43 pm
*How to add two and two using Epigram*
ghc -fglasgow-exts –make Main -o epigram
./epigram tests/Four.epig