From e8ff5a36c776c6808aacaa6ba488fe5fd19db497 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 8 Jul 2015 23:21:07 -0400 Subject: [PATCH 1/1] Add the no-equal-neighbors restriction for labels. --- doc/TODO | 1 - src/Domain.hs | 114 +++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 108 insertions(+), 7 deletions(-) delete mode 100644 doc/TODO diff --git a/doc/TODO b/doc/TODO deleted file mode 100644 index 0e56c5f..0000000 --- a/doc/TODO +++ /dev/null @@ -1 +0,0 @@ -1. Add no-equal-brothers restriction for subdomains (RFC1034). diff --git a/src/Domain.hs b/src/Domain.hs index f19b111..46c9306 100644 --- a/src/Domain.hs +++ b/src/Domain.hs @@ -74,7 +74,11 @@ letter = fmap Letter Parsec.letter -- manner... -- -- Since each part of DNS name is composed of our custom types, it --- suffices to munge the equality for 'Letter'. +-- suffices to munge the equality for 'Letter'. RFC4343 +-- clarifies the +-- case-insensitivity rules, but the fact that we're treating DNS +-- names as strings makes most of those problems go away (in +-- exchange for new ones). -- instance Eq Letter where (Letter l1) == (Letter l2) = (toLower l1) == (toLower l2) @@ -384,6 +388,14 @@ length_ldh_str_let_dig (LdhStrLetDig (Just ldhstring) _) = -- --