Type equality comparing both visible and invisible arguments, expanding synonyms and respecting multiplicities.
Moduleghc-9.14.1GHC2021
GHC.Core.TyCo.Compare
Type equality and comparison
Synopsis
- value eqType
- value eqTypeIgnoringMultiplicity
- value eqTypeX
- value eqTypes
- value eqVarBndrs
- value pickyEqType
- value tcEqType
- value tcEqKind
- value tcEqTypeNoKindCheck
- value tcEqTyConApps
- value tcEqTyConAppArgs
- value mayLookIdentical
- value nonDetCmpType
- value eqForAllVis
- value cmpForAllVis
- Packageghc-9.14.1
- Exports15
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceCompare.hs
Type equality
Compare types with respect to a (presumably) non-empty RnEnv2.
Type equality on lists of types, looking through type synonyms
Like pickyEqTypeVis, but returns a Bool for convenience
Just like tcEqType, but will return True for types of different kinds as long as their non-coercion structure is identical.
Check whether two TyConApps are the same; if the number of arguments are different, just checks the common prefix of arguments.
Returns True if the visible part of the types might look equal, even if they are really unequal (in the invisible bits)
This function is very similar to tc_eq_type but it is much more heuristic. Notably, it is always safe to return True, even with types that might (in truth) be unequal -- this affects error messages only (Originally this test was done by eqType with an extra flag, but the result was hard to understand.)