Skip to content

Very confusing error message with -fprint-explicit-kinds

While trying to work out a type error I encountered the following,

compiler/utils/Binary.hs:607:59: error:
    • Could not deduce: (~) * * arg *
      from the context: (~) * k (arg -> res)
    ...

Note how in the first line (~) is applied to four arguments whereas on the second it is applied to three. Presuambly this is due to the former being kind heterogeneous, so at very least I'd think that ~~ should be used here.

In general, it would be nice if we could make equalities a bit more readable, perhaps special-casing them in the pretty-printer as,

(a :: k) ~ (b :: k')
Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information