[Haskell-cafe] Proposal: Sum type branches as extended types (as Type!Constructor)

Ivan Miljenovic ivan.miljenovic at gmail.com
Thu Jun 3 20:47:26 EDT 2010


On 4 June 2010 03:18, Ozgur Akgun <ozgurakgun at gmail.com> wrote:
> On 3 June 2010 16:14, Gabriel Riba <griba2001 at gmail.com> wrote:
>>
>> Maybe we could take out importance on the number of _ wildcards
>> (constructor
>> arity) with a syntax like.
>>         li @ (Cons ...)
>>         li @ (Nil ...)
>
>
> can't you already use {} to get rid of the underscores?
>
> li@(Cons {})
> li@(Nil  {})

Even better: you shouldn't need the parentheses:

li at Cons{}
li at Nil{}

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com


More information about the Haskell-Cafe mailing list