pufuwozu/roy — Issue #53: Can't define implicit pattern match by using data constructors as function parameters
Author: eegg
Created: 2011-12-05 00:11:11+00:00
State: open

Given

```haskell

data Maybe a =
Just a | Nothing

data List a = Empty | Cons a (List a)
```

I can then write

```haskell

let head l = match l
case Empty = Nothing
case (Cons x xs) = Just x
```

However I can't write

```haskell
let head Empty = Nothing
let head (Cons x xs) = Just x
```
as this produces

Error: Parse error on line 8: Unexpected 'IDENTIFIER'

I can't remember what the latter style is called, but some might find it nicer.

(Though as it can just be reduced to the first example, it's just syntactic convenience and I would put this under "wishlist".)