
9 Jul
2013
9 Jul
'13
7:21 p.m.
On 10 July 2013 07:24, Simon Hengel
Hi, what about adding
instance IsString a => IsString (Maybe a) where fromString = Just . fromString
It makes specifying optional String/Text/... values more convenient. Here is an example that uses System.Process.shell:
Use
shell "ls -l" { cwd = "/home/me" }
instead of
shell "ls -l" { cwd = Just "/home/me" }
I'm not yet sure how essential it is. But I somehow can't see any issues with it. So why not?
-0.5 from me; I think it's too easy to forget that it's a Maybe value there when refactoring, etc. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com