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

Reify to list #3

Merged
merged 2 commits into from Feb 4, 2021
Merged

Reify to list #3

merged 2 commits into from Feb 4, 2021

Conversation

@landerlo
Copy link
Contributor

@landerlo landerlo commented Feb 3, 2021

Modularize the parse macro to use another macro that reifies composite languages type into a list of string or languages.
It could be useful for other purposes that use the composite type, e.g. create a new I18n with just the new type, not narrowing the type but extracting those elements.

It includes the challenge of how to turn the List[String] return into List[_ <: L] I couldn't see how to prove that as the matching is for the StringConstant, and that is not parameterised so we lose that proof that is guaranteed by the decomposition. A cast should be needed probably.

@landerlo landerlo force-pushed the landerlo:reifyToList branch from 5bea541 to d9f25bb Feb 3, 2021
@propensive propensive self-requested a review Feb 4, 2021
@propensive propensive self-assigned this Feb 4, 2021
src/core/cosmopolite.scala Outdated Show resolved Hide resolved
src/core/cosmopolite.scala Outdated Show resolved Hide resolved
@propensive propensive merged commit 4417e40 into propensive:main Feb 4, 2021
@propensive
Copy link
Owner

@propensive propensive commented Feb 4, 2021

Thanks, @landerlo!

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

Successfully merging this pull request may close these issues.

None yet

2 participants