zone :: Zone
zone = Zone {
- zoneName = mkDN "cielonegro.org."
- , zoneResponders = [ wrapResponder' $
- do name <- getQueryName
- if name == mkDN "ns.cielonegro.org." then
- respond ResourceRecord {
- rrName = name
- , rrType = A
- , rrClass = IN
- , rrTTL = 9600
- , rrData = inetAddr "127.0.0.1"
- }
- else
- fail "FIXME: we want to throw NameError but we can't for now"
- ]
+ zoneName = mkDN "cielonegro.org."
+ , zoneResponders = [ wrapResponder responderA
+ ]
, zoneIsAuthoritative = True
}
- wrapResponder' :: Responder A IN () -> SomeResponder
- wrapResponder' = wrapResponder
+ responderA :: Responder A IN ()
+ responderA = do name <- getQueryName
+ if name == mkDN "ns.cielonegro.org." then
+ respond ResourceRecord {
+ rrName = name
+ , rrType = A
+ , rrClass = IN
+ , rrTTL = 9600
+ , rrData = inetAddr "127.0.0.1"
+ }
+ else
+ fail "FIXME: we want to throw NameError but we can't for now"
inetAddr :: String -> HostAddress