Skip to content

Instantly share code, notes, and snippets.

@ggVGc
Created January 7, 2021 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ggVGc/26722b6bc0cb65de9fd9dee8ef336328 to your computer and use it in GitHub Desktop.
Save ggVGc/26722b6bc0cb65de9fd9dee8ef336328 to your computer and use it in GitHub Desktop.
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