[Haskell-cafe] One-element tuple

adam vogt vogt.adam at gmail.com
Mon Aug 19 16:39:23 CEST 2013


On Mon, Aug 19, 2013 at 5:40 AM, AntC <anthony_clayden at clear.net.nz> wrote:
...
> Would double-parens be too wild an idea?:
>
>     ... ((CustId 47)) `extend` (CustName "Fred", Gender Male)
>
>     f ((CustId x)) = ...
>
>     instance C ((CustId Int)) ...
>
> We'd have to avoid the double parens as in:
>
>     ((meth obj) (double x))
>

Hi Anthony,

This preprocessor I just threw together doesn't seem to suffers from
those issues <http://lpaste.net/91967>. This kind of approach probably
might let you steal T(..) while still allowing `T (..)' to refer to
whatever is the original, though I think that would require working
with the messier Annotated syntax tree.

Regards,
Adam




More information about the Haskell-Cafe mailing list