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

Dynamic function resolution #1

Open
Tritlo opened this issue Aug 24, 2021 · 0 comments
Open

Dynamic function resolution #1

Tritlo opened this issue Aug 24, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@Tritlo
Copy link
Owner

Tritlo commented Aug 24, 2021

One use case for dynamic types is dynamic function resolution. We already have a typeclass based dynamic dispatch, but what if we could be even more generic? E.g. the find function that works for any Foldable. It's not a function from the Foldable type class, but we should be able to generate a dispatch table for it. Similarly for functions that require multiple constraints. Essentially, we need a satisfying :: [Constraint] -> [Type] function that finds all the types that could work, and use that to generat the dispatch table to be used at runtime.

@Tritlo Tritlo added the enhancement New feature or request label Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant