Proposal: Improving the IsString String instance

Erik Hesselink hesselink at gmail.com
Mon Aug 26 21:39:06 CEST 2013


No need, they don't have the problem that started this thread. They
default to Integer.

Erik

On Mon, Aug 26, 2013 at 9:30 PM, Dag Odenhall <dag.odenhall at gmail.com> wrote:
> 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
>
>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>




More information about the Libraries mailing list