By tweaking the traversal types a bit (which admittedly makes the
implementations more annoying to write), we allow the use of
DerivingVia to produce TrieKey instances. This allows OrdKey
and similar types to be much more useful.
Make all the methods coercible.
Use OrdKey to implement the Integer instance for new enough GHC.
Add EnumKey and use it to implement the Char instance for new
enough GHC.
Add IntLikeKey and use it to implement the Word instance for new
enough GHC.
By tweaking the traversal types a bit (which admittedly makes the implementations more annoying to write), we allow the use of
DerivingVia
to produceTrieKey
instances. This allowsOrdKey
and similar types to be much more useful.OrdKey
to implement theInteger
instance for new enough GHC.EnumKey
and use it to implement theChar
instance for new enough GHC.IntLikeKey
and use it to implement theWord
instance for new enough GHC.