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…
There’s a library “GetOpt” for args,
else use System.getArgs :: IO [String]
readFile :: IO String, in the Prelude
enough?
Plenty.
And to that end, please find
Main.lhs and
NatVec.epig.
*How to add two and two using Epigram*
ghc -fglasgow-exts –make Main -o epigram
./epigram tests/Four.epig