Proposal to deprecate and then drop fromJust

Roman Cheplyaka roma at ro-che.info
Tue Feb 24 09:32:46 UTC 2015


On 24/02/15 11:28, Erik de Castro Lopo wrote:
> Roman Cheplyaka wrote:
> 
>> Say I have
>>
>>   parse :: String -> Maybe Value
>>   process :: Value -> IO ()
>>
>> Then (process . fromJust . parse) is the fastest way to compose the two.
> 
> Wouldn't
> 
>      process fromMaybe defaultValue . parse
> 
> do as well?

It sure would, just more typing (and a bit more thinking).

Roman


More information about the Libraries mailing list