alpaca icon indicating copy to clipboard operation
alpaca copied to clipboard

Support types with same name and different arities

Open yurrriq opened this issue 7 years ago • 2 comments

As a user, I'd like to define a type foo/1 as well as a type foo/2:

type foo 'a = Nothing | Just 'a

type foo 'a 'b = Left 'a | Right 'b

yurrriq avatar Dec 19 '16 04:12 yurrriq

What's the rationale for this? :)

lpil avatar Jan 18 '17 17:01 lpil

A better example is perhaps list.

type list = list any

type list 'a = Nil | Cons 'a (list 'a)

yurrriq avatar Jan 18 '17 20:01 yurrriq