Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Factory refinement types #17

Open
jonhue opened this issue Oct 16, 2020 · 1 comment
Open

Factory refinement types #17

jonhue opened this issue Oct 16, 2020 · 1 comment
Labels
proposal New proposal for the language spec
Milestone

Comments

@jonhue
Copy link
Member

jonhue commented Oct 16, 2020

Allow refinement types to act as factory and be instantiated in different circumstances with varying parameters.

# define as
type GreaterThan<a>(x :: a) := [y ~ a | y > x]

# use as
GreaterThan<Number>(5)

Can only be instantiated with literals.

Also allow instantiated parametric types on the right hand side.

@jonhue
Copy link
Member Author

jonhue commented Oct 19, 2020

depends on #16

@jonhue jonhue transferred this issue from tony-lang/tree-sitter-tony Nov 12, 2020
@jonhue jonhue added discussion Has not been decided upon yet proposal New proposal for the language spec labels Nov 12, 2020
@jonhue jonhue modified the milestones: 0.2.0, 0.3.0 Nov 12, 2020
@jonhue jonhue modified the milestones: 0.3.0, 0.2.0 Dec 15, 2020
@jonhue jonhue removed the discussion Has not been decided upon yet label Dec 15, 2020
@jonhue jonhue added this to Core Nov 19, 2021
@jonhue jonhue moved this to In Progress in Core Nov 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
proposal New proposal for the language spec
Projects
Status: In Progress
Development

No branches or pull requests

1 participant