Should getEnvVar just be overloaded in Posix.lhs or should the whole thing
(System PosixProcPrim) be changed?
--
Volker Stolz * [EMAIL PROTECTED] * PGP
Simon Marlow writes ("RE: Change to Posix.lhs"):
Should we use a Maybe rather than an exception here? Probably, but then
System.getVar doesn't return a Maybe, and the Posix library as a whole has a
tendency towards exceptions rather than Maybe returns. So I'm swithering(*)
o
Ian Jackson [EMAIL PROTECTED] writes:
Simon Marlow writes ("RE: Change to Posix.lhs"):
Should we use a Maybe rather than an exception here?
Probably, but then System.getVar doesn't return a Maybe,
and the Posix library as a whole has a tendency towards
exceptions rather
Attached is a patch of what I did to my Posix.lhs. The problem is that
'getEnvVar' will throw an exception when the variable is not
present in the
environment. Thus, I'm proposing 'mayGetEnvVar', which will return
Nothing | Just String. I can't think of a reason why anyone
would want to