derive-storable 0.1.0.3 → 0.1.0.4
raw patch · 4 files changed
+65/−47 lines, 4 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Foreign.Storable.Generic: alignment :: a -> Int
+ Foreign.Storable.Generic: alignment :: Storable a => a -> Int
- Foreign.Storable.Generic: peek :: Ptr a -> IO a
+ Foreign.Storable.Generic: peek :: Storable a => Ptr a -> IO a
- Foreign.Storable.Generic: peekByteOff :: Ptr b -> Int -> IO a
+ Foreign.Storable.Generic: peekByteOff :: Storable a => Ptr b -> Int -> IO a
- Foreign.Storable.Generic: peekElemOff :: Ptr a -> Int -> IO a
+ Foreign.Storable.Generic: peekElemOff :: Storable a => Ptr a -> Int -> IO a
- Foreign.Storable.Generic: poke :: Ptr a -> a -> IO ()
+ Foreign.Storable.Generic: poke :: Storable a => Ptr a -> a -> IO ()
- Foreign.Storable.Generic: pokeByteOff :: Ptr b -> Int -> a -> IO ()
+ Foreign.Storable.Generic: pokeByteOff :: Storable a => Ptr b -> Int -> a -> IO ()
- Foreign.Storable.Generic: pokeElemOff :: Ptr a -> Int -> a -> IO ()
+ Foreign.Storable.Generic: pokeElemOff :: Storable a => Ptr a -> Int -> a -> IO ()
- Foreign.Storable.Generic: sizeOf :: a -> Int
+ Foreign.Storable.Generic: sizeOf :: Storable a => a -> Int
Files
- ChangeLog.md +6/−2
- README.md +2/−0
- derive-storable.cabal +16/−4
- src/Foreign/Storable/Generic/Instances.hs +41/−41
ChangeLog.md view
@@ -1,8 +1,12 @@-# Revision history for generic-storable-plugin+# Revision history for derive-storable +## 0.1.0.4 -- 2016-11-29++* Fixed the bug with Foreign.Storable.Generic.Internal.Instances module.+* Removed two tests related to numbering of fields.+ ## 0.1.0.3 -- 2016-09-19 -* Fixed cabal file (no dependencies on generic-storable, just on derive-storable) * Changed the link in README to hackage repository. ## 0.1.0.2 -- 2016-09-11
README.md view
@@ -1,5 +1,7 @@ # Introduction +[](https://travis-ci.org/mkloczko/derive-storable)+ The `derive-storable` package allows you to automatically generate Storable instances for your datatypes. It uses GHC.Generics, which allows the coders to derive certain instances automatically. To derive a (G)Storable instance, the data-type has to: * have only one constructor.
derive-storable.cabal view
@@ -1,10 +1,9 @@ name: derive-storable -version: 0.1.0.3-synopsis: Derive Storable instances with help of GHC.Generics. +version: 0.1.0.4+synopsis: Derive Storable instances with GHC.Generics. -description: The package allows for automatic derivation of Storable instances - with C-like memory layout.+description: Derive Storable instances with GHC.Generics. The derived Storable instances have the same alignment as C structs. homepage: https://www.github.com/mkloczko/derive-storable/ license: MIT@@ -48,3 +47,16 @@ build-depends: base >= 4.8 && < 4.10, derive-storable, hspec == 2.2.*, QuickCheck == 2.8.* default-language: Haskell2010+++source-repository head+ type: git+ location: https://github.com/mkloczko/derive-storable+ branch: master+++source-repository this+ type: git+ location: https://github.com/mkloczko/derive-storable+ branch: master+ tag: bb5cc5d3fa34c8346fda84898606ea3c120ea131
src/Foreign/Storable/Generic/Instances.hs view
@@ -52,54 +52,54 @@ MakeGStorable(Word32) MakeGStorable(Word64) -MakeGStorable (Fingerprint)+MakeGStorable(Fingerprint) -- C primitives-MakeGStorable (CUIntMax)-MakeGStorable (CIntMax)-MakeGStorable (CSUSeconds)-MakeGStorable (CUSeconds)-MakeGStorable (CTime)-MakeGStorable (CClock)-MakeGStorable (CSigAtomic)-MakeGStorable (CPtrdiff)-MakeGStorable (CDouble)-MakeGStorable (CFloat)-MakeGStorable (CULLong)-MakeGStorable (CLLong)-MakeGStorable (CULong)-MakeGStorable (CLong)-MakeGStorable (CUInt)-MakeGStorable (CInt)-MakeGStorable (CUShort)-MakeGStorable (CShort)-MakeGStorable (CUChar)-MakeGStorable (CSChar)-MakeGStorable (CChar)+MakeGStorable(CUIntMax)+MakeGStorable(CIntMax)+MakeGStorable(CSUSeconds)+MakeGStorable(CUSeconds)+MakeGStorable(CTime)+MakeGStorable(CClock)+MakeGStorable(CSigAtomic)+MakeGStorable(CPtrdiff)+MakeGStorable(CDouble)+MakeGStorable(CFloat)+MakeGStorable(CULLong)+MakeGStorable(CLLong)+MakeGStorable(CULong)+MakeGStorable(CLong)+MakeGStorable(CUInt)+MakeGStorable(CInt)+MakeGStorable(CUShort)+MakeGStorable(CShort)+MakeGStorable(CUChar)+MakeGStorable(CSChar)+MakeGStorable(CChar) -- Ptr-MakeGStorable (IntPtr)-MakeGStorable (WordPtr)+MakeGStorable(IntPtr)+MakeGStorable(WordPtr) -MakeGStorable ((StablePtr a))-MakeGStorable ((Ptr a)) -MakeGStorable ((FunPtr a))+MakeGStorable((StablePtr a))+MakeGStorable((Ptr a)) +MakeGStorable((FunPtr a)) -- Posix-MakeGStorable (Fd)-MakeGStorable (CRLim)-MakeGStorable (CTcflag)-MakeGStorable (CSpeed)-MakeGStorable (CCc)-MakeGStorable (CUid)-MakeGStorable (CNlink)-MakeGStorable (CGid)-MakeGStorable (CSsize)-MakeGStorable (CPid)-MakeGStorable (COff)-MakeGStorable (CMode)-MakeGStorable (CIno)-MakeGStorable (CDev)+MakeGStorable(Fd)+MakeGStorable(CRLim)+MakeGStorable(CTcflag)+MakeGStorable(CSpeed)+MakeGStorable(CCc)+MakeGStorable(CUid)+MakeGStorable(CNlink)+MakeGStorable(CGid)+MakeGStorable(CSsize)+MakeGStorable(CPid)+MakeGStorable(COff)+MakeGStorable(CMode)+MakeGStorable(CIno)+MakeGStorable(CDev)