Re: Proposal: System.Environment.getEnv should return Maybe

Currently there is no one planning to use MaybeT in System.Environment, since this would mean to make base/haskell2010 depend on transformers. But an option might be to start a package where generally IO exceptions are replaced by MaybeT and its friends. Then we could leave System.Environment as it is.
But people don't want to leave System.Environment as it is. That was the point of the proposal, which does have widespread support (IIRC nobody spoke in defense of the current behavior). And as you point out, using MaybeT in System.Environment is currently a non-starter, which makes IO (Maybe String) the obvious type choice regardless of use case. The proposal didn't go through the entire chain of reasoning there, but I would expect it's obvious to everyone involved in the discussion. In my support of the proposal, I tossed in a (probably ill-advised) comment expressing my dislike of implicit exceptions in general, which I have to say I now regret. I certainly don't want this proposal, which has universal support, to become bogged down in a discussion about implicit exceptions in general. Especially since the general discussion seems to have little to add to the specifics of this particular proposal. With apologies, John L.
participants (1)
-
John Lato