[Haskell] Extensible records: Static duck typing

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Fri Feb 8 20:42:23 EST 2008

[hm.  should this discussion move to -cafe?]

On Feb 8, 2008, at 20:15 , Jonathan Cast wrote:

> On 8 Feb 2008, at 4:43 PM, Dan Weston wrote:
>> Ouch. How would a human parse [apple'*'pear]
> In this context, `parse error, tricky syntax'.

I kinda have that problem anyway given ' being permitted in  
identifiers at all.  Given that I expect it now, the above isn't a  
whole lot worse (I've already parsed (token "apple'") when I hit the  
(token "*'"), the only question is whether the extension in use  
attaches the ' to the operator or to the following identifier.

(Although I would assume the latter if I ran into it without prior  
knowledge, based on ' normally being a word-identifier character when  
it can't be a Char literal.)

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the Haskell mailing list