Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move hSpec tests for 'lookupAAAA' into the (tested) docs for 'lookupA…

…AAA'.
  • Loading branch information...
commit 6e4cfbbe6c5c496ccf701244730a88fabd9176a6 1 parent db3f67e
@orlitzky orlitzky authored
Showing with 11 additions and 7 deletions.
  1. +11 −3 Network/DNS/Lookup.hs
  2. +0 −4 test2/LookupSpec.hs
View
14 Network/DNS/Lookup.hs
@@ -97,9 +97,17 @@ lookupA rlv dom = do
unTag (RD_A x) = Right x
unTag _ = Left UnexpectedRDATA
-{-|
- Resolving 'IPv6' by 'AAAA'.
--}
+
+-- | Look up all (IPv6) \'AAAA\' records for the given hostname.
+--
+-- Examples:
+--
+-- >>> let hostname = Data.ByteString.Char8.pack "www.mew.org"
+-- >>>
+-- >>> rs <- makeResolvSeed defaultResolvConf
+-- >>> withResolver rs $ \resolver -> lookupAAAA resolver hostname
+-- Right [2001:240:11e:c00:00:00:00:101]
+--
lookupAAAA :: Resolver -> Domain -> IO (Either DNSError [IPv6])
lookupAAAA rlv dom = do
erds <- DNS.lookup rlv dom AAAA
View
4 test2/LookupSpec.hs
@@ -19,10 +19,6 @@ spec = do
`shouldReturn`
Right []
- DNS.lookupAAAA resolver "www.mew.org"
- `shouldReturn`
- Right ["2001:240:11e:c00::101"]
-
describe "lookupNS" $ do
it "gets NS" $ do
rs <- makeResolvSeed defaultResolvConf
Please sign in to comment.
Something went wrong with that request. Please try again.