derivingvia-extras

Version 0.1.0.0 revision 0 uploaded by BaldurBlondal.

Package meta

Synopsis
DerivingVia extras - Miscellaneous /via/ types.
Description

Includes various functionality to use with DerivingVia.

-- >> alice = User "Alice" 50 0xDEADBEAF
-- >> bob   = User "Bob"   20 0xDEADBEAF
-- >>
-- >> alice == bob
-- True
-- >> hash alice == hash bob
-- True
data User = User
  { name   :: String
  , age    :: Int
  , userID :: Integer
  }
  deriving (Eq, Ord, Hashable)
  via User `On` "userID"
Author
Baldur Blöndal
Bug reports
https://github.com/Icelandjack/derivingvia-extras/issues
Category
Deriving, Utils
Copyright
n/a
Homepage
n/a
Maintainer
Baldur Blöndal
Package URL
n/a
Stability
n/a

Components