
"Brian" == Brian Hulley
writes: Brian> Some other possibilities are:
Brian> 1) Every command returns a pair consisting of result and return Brian> code IMHO the distinction between command's output (to stdout and stderr) and its return code is one of the faults in UNIX shells. Nothing, but log should be written to stdout by command, and stderr should be useless if we use exceptions (I'm not quite sure). Brian> 2) Use exceptions instead of stderr instead of stderr and return code. The return code of `test' is in fact its result. Brian> 3) Use a more complicated monad
It may still be a good idea to take the top 20 unix utils and code them as native haskell functions and see how far that goes. I know there are some existing libraries that deal with basic stuff like mv, etc. Has anyone implemented grep, find, etc?
Brian> This is also how I would start because it would allow all the Brian> control flow/ ease of use issues to be explored just using GHCi Brian> / Hugs etc before tackling the problem of how to get binaries Brian> to interface with the shell. -- WBR, Max Vasin.