[Haskell] Extensible records: Static duck typing

Dan Weston westondan at imageworks.com
Fri Feb 8 19:43:43 EST 2008


Ouch. How would a human parse [apple'*'pear]

If this doesn't immediately scan as [ (*') (apple') (pear) ] to you (it 
doesn't to me) then maybe allowing ' in infix operators may not be the 
best thing.

John Meacham wrote:
> On Tue, Feb 05, 2008 at 08:01:07AM -0500, Cale Gibbard wrote:
>> I also like this idea. Retaining the ability to treat selection as a
>> function easily is quite important, and this meets that criterion
>> nicely. Also, in which case does this cause a program to break? It
>> seems that you're only reinterpreting what would be unterminated
>> character literals.
> 
> Ah, you are right. for some reason I was thinking we allowed identifiers
> to start with ', but yeah. this seems fully backwards compatable. while
> we are at it, we should allow ' in infix operators to.
> 
> a *' b = almostMultiply a b
> 
>         John
> 




More information about the Haskell mailing list