Skip to content

Use dataToTag# to derive Ord instances for enumerations

When looking into #16577 I rediscovered that GHC-derived Ord instances grow quite quickly. However, it does seem like there is some low-hanging fruit in the case of pure enumerations: Compare on the basis of tag via dataToTag#.

The same can be done for Eq and Enum.

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