Skip to content

:info and type synonyms

:info is not displaying instances for type synonyms. Example:

λ> :set -XFlexibleInstances -XTypeSynonymInstances
λ> class C a
λ> instance C Int
λ> instance C String

Now, :i Int shows C Int, but :i String does not show C String.

Doing this in general looks hard, e.g. for type T a = (a,a). This ticket is restricted only to fully saturated types, where the situation is clear.

This is relevant to linear types: it's likely we'll have type (->) = FUN 'Omega and we still want :info (->) to show instances such as Monad ((->) r).

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information