Created
January 7, 2021 12:56
-
-
Save ggVGc/26722b6bc0cb65de9fd9dee8ef336328 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data HashedTag = HashedTag Int Text.Text deriving (Show) | |
instance Eq HashedTag where | |
(HashedTag a _) == (HashedTag b _) = a == b | |
instance Ord HashedTag where | |
(HashedTag a _) `compare` (HashedTag b _) = | |
compare a b | |
instance Hashable HashedTag where | |
hashWithSalt salt (HashedTag h _) = salt `hashWithSalt` h | |
data Tag = | |
T HashedTag | |
deriving (Show, Eq, Ord, Generic) | |
instance Hashable Tag |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment