hask
hask copied to clipboard
Fix unification of higher-kinded types when performing type inference
Related to #1, the type system does not unify higher-kinded types correctly, as it ignores kind when unifying, so a TypeVariable
like m a
currently unifies with a type like Either int str
. This was done tso that typeclasses could be quickly grafted onto the type system; unlike in Haskell, where a partially-applied HKT can be a member of a typeclass (e.g., Either a
is a member of Monad
), here the HKT object itself is always a member. This is a temporary hack and should be corrected.