Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pattern synonyms #8

Open
int-index opened this issue Jan 27, 2018 · 1 comment
Open

Pattern synonyms #8

int-index opened this issue Jan 27, 2018 · 1 comment

Comments

@int-index
Copy link
Owner

int-index commented Jan 27, 2018

U1, U2, U3, U4, ... U16 for Union
OU1, OU2, OU3, OU4, ... OU16 for OpenUnion

Generate via TH, taking the amount as a parameter.

@int-index
Copy link
Owner Author

Type-indexed patterns:

f = OpenUnion '[Integer, Bool, Char] -> r
f = \case
  OU (a :: Integer) -> ...
  OU (b :: Bool) -> ...
  OU (c :: Char) -> ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant