Proposal: Improving the IsString String instance

Dag Odenhall dag.odenhall at gmail.com
Mon Aug 26 21:30:24 CEST 2013


Let's also make number literals monomorphic to Integer and provide an n ::
Num a => Integer -> a!


On Mon, Aug 26, 2013 at 9:16 PM, Herbert Valerio Riedel <hvr at gnu.org> wrote:

> On 2013-08-26 at 19:39:40 +0200, Henning Thielemann wrote:
> > On Mon, 26 Aug 2013, Henning Thielemann wrote:
> >
> >> This "opting in" already exists: Just put a space between o and the
> >> quotation mark and define "o = fromString". It's Haskell 98.
> >
> > I was wrong: You even don't need the space between o and ".
>
> it's almost perfect imho, except maybe for the minor issue that you will
> have to surround string literals with () or use $ sometimes, as in
>
>   length (o"Overloaded String")
>
> cheers,
>   hvr
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20130826/a8ab3924/attachment.htm>


More information about the Libraries mailing list