haskell-hvr / resolv

https://hackage.haskell.org/package/resolv
Other
9 stars 11 forks source link

Why resolv-0.1.1.3 allows only base-4.13, and 0.1.1.2 the "rest"? #7

Closed phadej closed 4 years ago

phadej commented 4 years ago

AFAICS

--- resolv-0.1.1.2/src/Network/DNS/Message.hs   2018-10-28 01:43:14.000000000 +0300
+++ resolv-0.1.1.3/src/Network/DNS/Message.hs   2001-09-09 04:46:40.000000000 +0300
@@ -93,7 +93,7 @@

 instance Binary CharStr where
     put (CharStr bs)
-      | BS.length bs > 0xff = fail "putString: string too long"
+      | BS.length bs > 0xff = error "putString: string too long"
       | otherwise = do
             putWord8 (fromIntegral $ BS.length bs)
             putByteString bs
@@ -593,7 +593,7 @@
         rdataLen = BSL.length rdata

     unless (rdataLen < 0x10000) $
-        fail "rdata too large"
+        error "rdata too large"

     putWord16be (fromIntegral rdataLen)
     putLazyByteString rdata
@@ -740,7 +740,7 @@

 encodeNsecTypeMap :: Set Type -> Put
 encodeNsecTypeMap bmap = do
-    when (Set.null bmap) $ fail "invalid empty type-map"
+    when (Set.null bmap) $ error "invalid empty type-map"
     -- when (Set.member 0 bmap) $ fail "invalid TYPE0 set in type-map"
     -- TODO: verify that Meta-TYPES and QTYPEs aren't contained in bmap

would work with older base as well?

arrowd commented 4 years ago

@hvr can anything be done about this, please?

hvr commented 4 years ago

This is resolved with http://hackage.haskell.org/package/resolv-0.1.2.0