Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add a note mentioning that "no records" is a successful result.

  • Loading branch information...
commit 4e069e9ce6713d6a1a76dc4b650fc59da1312686 1 parent 6e4cfbb
@orlitzky orlitzky authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 Network/DNS/Lookup.hs
View
6 Network/DNS/Lookup.hs
@@ -7,7 +7,7 @@
-- We can think of the return type as \"either what I asked for, or
-- an error\". For example, the 'lookupA' function, if successful,
-- will return a list of 'IPv4'. The 'lookupMX' function will
--- instead return a list of ('Domain',Int) pairs, where each pair
+-- instead return a list of @('Domain',Int)@ pairs, where each pair
-- represents a hostname and its associated priority.
--
-- The errors that can occur are the same for all lookups. Namely:
@@ -21,6 +21,10 @@
-- If an error occurs, you should be able to pattern match on the
-- 'DNSError' constructor to determine which of these is the case.
--
+-- /Note/: A result of \"no records\" is not considered an
+-- error. If you perform, say, an \'AAAA\' lookup for a domain with
+-- no such records, the \"success\" result would be @Right []@.
+--
-- We perform a successful lookup of \"www.example.com\":
--
-- >>> let hostname = Data.ByteString.Char8.pack "www.example.com"
Please sign in to comment.
Something went wrong with that request. Please try again.