Proposal to deprecate and then drop fromJust

Henning Thielemann lemming at henning-thielemann.de
Tue Feb 24 10:14:28 UTC 2015



On Tue, 24 Feb 2015, Ivan Lazar Miljenovic wrote:

> I've used fromJust in the past when I knew the value would be Just by
> construction.

If you know that the value is always Just by construction, why don't you 
express this with the types, i.e. by turning from 'Maybe a' to 'a'? When 
asking this question myself I could remove fromJusts in most cases. The 
problem is most oftenly that you drop the information that a value is Just 
too early and then you cannot recover it later.


More information about the Libraries mailing list