Type classes and named implementations #9
Labels
about: design
Related to design problems
about: parsing
Related to the lexer & parser
about: type-checker
Related to how types are statically checked
kind: enhancement
New feature or request
There are multiple ways to handle ad-hoc polymorphism (re-defining a given function with different types):
The retained option is number 2, adding type classes and implementations.
For this to work, we have to think about:
constraint
kind representing any concrete (fully applied) constraint.-XFlexibleConstraints
extension of Haskell).forall<a | show(a)> u64 -> u64
-XFlexibleInstances
,-XMultiParamTypeClasses
and some other Haskell extensions as default) and also allow using a special_
(or·
) as a sort of a “function hole” (like at the expression level). This is sufficiently restricted not to need higher order unification of type terms (which would be undecidable).Originally posted by @Mesabloo in #4 (comment)
The text was updated successfully, but these errors were encountered: