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

teach the/2 about intersection types #3

@mndrix

Description

@mndrix

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions