Skip to content
This repository was archived by the owner on Aug 15, 2018. It is now read-only.

teach the/2 about intersection types #3

Open
mndrix opened this issue Feb 4, 2013 · 0 comments
Open

teach the/2 about intersection types #3

mndrix opened this issue Feb 4, 2013 · 0 comments

Comments

@mndrix
Copy link
Owner

mndrix commented Feb 4, 2013

Intersection types are just a conjunction of two other type constraints. We see their utility in the default types implemented in error:has_type/2. For example, positive_integer is really the intersection of positive and integer.

Support intersection types with a syntax similar to union types:

the((positive,integer), X)
the((nonempty,list), Xs)

It might be nice to add a little extra sugar so we avoid the extra parens, but I'm not we should at this point:

the(positive, integer, X)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant