Skip to content
This repository has been archived by the owner. It is now read-only.

Data constructors can't take arrays or tuples #162

Open
brow opened this issue Dec 6, 2012 · 0 comments

Comments

Projects
None yet
1 participant
@brow
Copy link
Collaborator

commented Dec 6, 2012

I noticed that the following type declarations don't parse:

data Tree a = Tree a [Tree a]
data Point = Point (Number, Number)

Is there a way, then, to define data constructors that take arrays or tuples? It seems like the former can be hacked in just by defining a syntactically sugar-free synonym for [a]. Then we can write:

data Tree a = Tree a (List (Tree a))

However, I can't find any such synonym in the docs or examples.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.