packages feed

storable-endian 0.2.0 → 0.2.1

raw patch · 2 files changed

+7/−1 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Data.Storable.Endian: instance (HasLittleEndian a, Storable a) => Storable (LittleEndian a)

Files

Data/Storable/Endian.hs view
@@ -44,6 +44,12 @@   peekBE :: Ptr a -> IO a   pokeBE :: Ptr a -> a -> IO () +instance (HasLittleEndian a, Storable a) => Storable (LittleEndian a) where+  sizeOf    (LE a)   = sizeOf a+  alignment (LE a)   = alignment a+  peek      p        = LE `fmap` peekLE (castPtr p)+  poke      p (LE a) = pokeLE (castPtr p) a+ instance (HasBigEndian a, Storable a) => Storable (BigEndian a) where   sizeOf    (BE a)   = sizeOf a   alignment (BE a)   = alignment a
storable-endian.cabal view
@@ -1,5 +1,5 @@ Name: storable-endian-Version: 0.2.0+Version: 0.2.1 License: BSD3 License-file: LICENSE Copyright: Eugene Kirpichov, 2010