An IsString (NonEmpty Char) instance

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Sun Sep 3 22:25:04 UTC 2017


On 4 September 2017 at 08:17, Henning Thielemann
<lemming at henning-thielemann.de> wrote:
>
> On Mon, 4 Sep 2017, Ivan Lazar Miljenovic wrote:
>
>> It's backwards-incompatible, but my preference - especially when you
>> consider the libraries that parse the String - is to have fromString return
>> Maybe.
>
>
> An expression that is undefined because of "" would become an expression
> that is undefined because of Nothing, right? I do not see a benefit.

Sorry, yes, I was thinking that GHC could determine that the result
was Nothing and throw a type-checking failure, but that doesn't work.

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
http://IvanMiljenovic.wordpress.com


More information about the Libraries mailing list