-
-
Save dminuoso/af46f4b5cea5c2b132cda1bcc0b82723 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
ci :: Maybe T.Text -> Maybe CI | |
ci = coerce | |
instance Eq Zone where | |
l == r = getAll (go l r) | |
where | |
equaling :: Eq b => (a -> b) -> a -> a -> All | |
equaling f x y = All (f x == f y) | |
go = equaling zone_id | |
<> equaling (ci . zone_name) | |
<> equaling zone_type | |
<> equaling zone_url | |
<> equaling zone_kind | |
<> equaling zone_rrsets | |
<> equaling zone_serial | |
<> equaling zone_notified_serial | |
<> equaling zone_edited_serial | |
<> equaling zone_masters | |
<> equaling zone_dnssec | |
<> equaling zone_nsec3param | |
<> equaling zone_nsec3narrow | |
<> equaling zone_presigned | |
<> equaling zone_soa_edit | |
<> equaling zone_soa_edit_api | |
<> equaling zone_api_rectify | |
<> equaling zone_zone | |
<> equaling zone_account | |
<> equaling zone_nameservers | |
<> equaling zone_master_tsig_key_ids | |
<> equaling zone_slave_tsig_key_ids | |
instance Ord Zone where | |
compare = comparing zone_id | |
<> comparing (ci . zone_name) | |
<> comparing zone_type | |
<> comparing zone_url | |
<> comparing zone_kind | |
<> comparing zone_rrsets | |
<> comparing zone_serial | |
<> comparing zone_notified_serial | |
<> comparing zone_edited_serial | |
<> comparing zone_masters | |
<> comparing zone_dnssec | |
<> comparing zone_nsec3param | |
<> comparing zone_nsec3narrow | |
<> comparing zone_presigned | |
<> comparing zone_soa_edit | |
<> comparing zone_soa_edit_api | |
<> comparing zone_api_rectify | |
<> comparing zone_zone | |
<> comparing zone_account | |
<> comparing zone_nameservers | |
<> comparing zone_master_tsig_key_ids | |
<> comparing zone_slave_tsig_key_ids | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment