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
This issue is about the ability to implement languages with type-classes. Such that LangB will have another term constructor BInstance which evaluates to a type-class instance according to its type (such as [Int] -> Json).
The infer of "instance" nodes should add a type-class constraint
For evaluation/compilation: it might be useful for the InferOf to include a reference to the term's corresponding type-class constraint so that the type-class instance can be looked up from it
The generated constraints can probably be resolved/simplified in a post-process after the inference, that matches them with existing instances. For example [Int] -> Json can be resolved by a -> Json => [a] -> Json and Int -> Json.
TODO (flesh-out): We should consider the interactions with let-generalization and to-nom
The text was updated successfully, but these errors were encountered:
This issue is about the ability to implement languages with type-classes. Such that
LangB
will have another term constructorBInstance
which evaluates to a type-class instance according to its type (such as[Int] -> Json
).infer
of "instance" nodes should add a type-class constraintInferOf
to include a reference to the term's corresponding type-class constraint so that the type-class instance can be looked up from it[Int] -> Json
can be resolved bya -> Json => [a] -> Json
andInt -> Json
.The text was updated successfully, but these errors were encountered: