You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 anyFoldable
. It's not a function from theFoldable
type class, but we should be able to generate a dispatch table for it. Similarly for functions that require multiple constraints. Essentially, we need asatisfying :: [Constraint] -> [Type]
function that finds all the types that could work, and use that to generat the dispatch table to be used at runtime.The text was updated successfully, but these errors were encountered: