HORIZON HASKELLDocslts/ghc-10.0.x2b276322026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 2b27632 · 2026-10-31

Type equality

Dealing with invisible bits in types

mayLookIdentical returns:

  • An empty set if the two types are distinct unequal, and remain distinct even if we hide explicit kinds, runtime-reps, multiplicities.

  • A non-empty set of invis_bits, if the two types might look equal, but are in fact distinct in the returned invis_bits.

See Note [mayLookIdentical], as well as Note [Showing invisible bits of types in error messages] in GHC.Tc.Errors.Ppr.

datadata InvisibleBit

Something in a type which might be invisible.

Used to avoid reporting confusing errors to the user, like:

Couldn't match (a -> b) with (a -> b)

When in fact it is e.g. (a %1 -> b) vs (a %Many -> b), but the multiplicites have been suppressed.

See Note [Showing invisible bits of types in error messages] in GHC.Tc.Errors.Ppr.

Instances4Eq, Ord, Show, Outputable

Type comparison

Visiblity comparision