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

add higher-kinded type support to TH #2506

Merged
merged 5 commits into from
Apr 13, 2023

Conversation

ndwarshuis
Copy link
Contributor

addresses other half of #2475

Overview of changes to logic: rather than immediately parsing the dhall type into a union/single constructor, first recursively peel back any lambdas at the front of the dhall type and collect these in a bound variable list. Then when constructing the nested data type, add two paths for a) higher kinded haskell types (besides Maybe and List) and b) any of these bound variables from the front of the type.

The main gotcha is that this won't work with built-in From/ToDhall derivations as produced by GenerateOptions (or if this is possible I don't know how to do it). In any case the docs are updated to reflect this.

Copy link
Collaborator

@Gabriella439 Gabriella439 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great! thank you for contributing this!!! 😊

@Gabriella439 Gabriella439 merged commit 85146e5 into dhall-lang:main Apr 13, 2023
locallycompact pushed a commit to locallycompact/dhall-haskell that referenced this pull request Apr 26, 2023
locallycompact pushed a commit to locallycompact/dhall-haskell that referenced this pull request Apr 26, 2023
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.

2 participants