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

Improve the TH module #12

Merged
merged 6 commits into from
Jul 28, 2024
Merged

Improve the TH module #12

merged 6 commits into from
Jul 28, 2024

Conversation

snejugal
Copy link
Owner

@snejugal snejugal commented Jun 18, 2024

  • Let the user generate logic types and Logical instances separately;
  • Generate proper logic types for newtypes;
  • Generate corresponding Logical instances for newtypes;
  • Remove the need for the ConstraintKinds extension;
  • Support mutually exclusive types;
  • Support syntax like (:*) Int Int and Int `Pair` Int;
  • Let the user configure derived instances for the logical type;
  • Generate prisms for exhaustive matching;
  • Let the user configure constraints for the logical type?
  • Let the user configure prefixes for logical names?

Closes #7.

Besides refactoring the module,

- Let the user generate logic types and 'Logical' instances separately;
- Generate proper logic types for `newtype`s;
- Remove the need for the `ConstraintKinds` extension;
- Support mutually exclusive types;
- Support syntax like `(:*) Int Int` and ``Int `Pair` Int``;
- Let the user configure derived instances for the logical type.
@snejugal snejugal requested a review from fizruk June 18, 2024 21:29
@snejugal snejugal marked this pull request as ready for review July 28, 2024 14:01
@snejugal snejugal merged commit f13931a into master Jul 28, 2024
4 checks passed
@snejugal snejugal deleted the th-improvements branch July 28, 2024 14:01
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

Successfully merging this pull request may close these issues.

Derive prisms suitable for pattern matching via Template Haskell
1 participant