+ resolve_address )
+import ExitCodes (exit_bad_server)
+import Timeout (Timeout(seconds))
+
+
+-- | Given a list of delegates, report results for this
+-- 'LookupResult'.
+--
+-- If there's an empty list in the second component, there were no
+-- query results, so we report that the domain was not delegated. If
+-- there were some results and there are leftovers (after removing
+-- the delegates), we report those as well.
+--
+-- Before processing, all names are normalized using the supplied
+-- function @normalize_function@. Ideally this should be the same
+-- function applied to the user-input names.
+--
+report :: [Domain] -- ^ The list of @delgts@
+ -> (Domain -> Domain) -- ^ Domain name normalization function,
+ -- @normalize_function@.
+ -> LookupResult
+ -> IO ()
+
+-- If the lookup succeeded but there were no results, report that the
+-- domain is not delegated. Note that the behavior of the DNS library
+-- changed with regard to this at some point: we used to get back
+-- a "success," but with an empty list of results. Now a NameError
+-- (which is not actually an error!) is returned.
+report _ _ (d, Left NameError) =