I found this whilst working on https://github.com/purescript/purescript/pull/2486
The following works as expected:
eg = show (unit :: Unit)
If we annotate Unit with its kind, it fails:
eg = show (unit :: (Unit :: *))
We get:
No type class instance was found for
Data.Show.Show (Unit :: *)
while inferring the type of show unit
while applying a function show
of type forall a. (Show a) => a -> String
to argument unit
in value declaration eg
Looks like KindedType is missing from various functions in TypeChecker.Entailment; e.g: typeHeadsAreEqual, typesAreEqual.
Oops, thanks :)
Okay I've worked out a solution to this, I'll submit a PR shortly.
Most helpful comment
Okay I've worked out a solution to this, I'll submit a PR shortly.