packages feed

tap 0.1.0.0 → 0.2.0.0

raw patch · 3 files changed

+8/−8 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for tap +## 0.2.0.0 -- 11-2-2026++* fix writer struct match check+ ## 0.1.0.0 -- 11-2-2026  * First version. Released on an unsuspecting world.
lib/Data/Tap.hs view
@@ -9,7 +9,6 @@ import Data.Binary.Get import Data.Binary.Put import Data.Bits-import Data.Either import Data.Function import Data.Int import Data.List@@ -162,13 +161,10 @@     go [] = Right []     go (f:fs) = case lookupFld dfn $ num f of       Nothing -> Left $ "undefined field: " ++ show f-      Just d-        | mismatchStructs (structs d) (structs f) -> Left $+      Just d -> case match (structs d) (structs f) of+        Right (_, []) -> (f:) <$> go fs+        _ -> Left $           "mismatched structs: dfn=" ++ show (structs d) ++ " field=" ++ show (structs f)-        | otherwise -> (f:) <$> go fs--mismatchStructs :: [Struct] -> [Struct] -> Bool-mismatchStructs ds = any isLeft . zipWith matchStruct ds  -- | radiotap structure data Struct = U8 Word8 | S8 Int8 | U16 Word16 | S16 Int16 | U32 Word32
tap.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.0 name:               tap-version:            0.1.0.0+version:            0.2.0.0 synopsis:           radiotap description:        https://radiotap.org homepage:           https://github.com/dopamane/tap