derive-storable 0.1.1.0 → 0.1.1.1
raw patch · 3 files changed
+33/−1 lines, 3 filesdep ~basedep ~hspecPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base, hspec
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 +4/−0
- derive-storable.cabal +1/−1
- src/Foreign/Storable/Generic/Instances.hs +28/−0
ChangeLog.md view
@@ -1,5 +1,9 @@ # Revision history for derive-storable +## 0.1.1.1 -- 2017-10-05++* Fixed a bug with POSIX types enabled on non POSIX systems.+ ## 0.1.1.0 -- 2017-07-19 * Bumped to GHC 8.2.*
derive-storable.cabal view
@@ -1,6 +1,6 @@ name: derive-storable -version: 0.1.1.0+version: 0.1.1.1 synopsis: Derive Storable instances with GHC.Generics. description: Derive Storable instances with GHC.Generics. The derived Storable instances have the same alignment as C structs.
src/Foreign/Storable/Generic/Instances.hs view
@@ -9,7 +9,9 @@ -} + {-# LANGUAGE CPP #-}+#include "HsBaseConfig.h" module Foreign.Storable.Generic.Instances () where import Data.Int@@ -87,19 +89,45 @@ -- Posix MakeGStorable(Fd)+#if defined(HTYPE_RLIM_T) MakeGStorable(CRLim)+#endif+#if defined(HTYPE_TCFLAG_T) MakeGStorable(CTcflag)+#endif+#if defined(HTYPE_SPEED_T) MakeGStorable(CSpeed)+#endif+#if defined(HTYPE_CC_T) MakeGStorable(CCc)+#endif+#if defined(HTYPE_UID_T) MakeGStorable(CUid)+#endif+#if defined(HTYPE_NLINK_T) MakeGStorable(CNlink)+#endif+#if defined(HTYPE_GID_T) MakeGStorable(CGid)+#endif+#if defined(HTYPE_SSIZE_T) MakeGStorable(CSsize)+#endif+#if defined(HTYPE_PID_T) MakeGStorable(CPid)+#endif+#if defined(HTYPE_OFF_T) MakeGStorable(COff)+#endif+#if defined(HTYPE_MODE_T) MakeGStorable(CMode)+#endif+#if defined(HTYPE_INO_T) MakeGStorable(CIno)+#endif+#if defined(HTYPE_DEV_T) MakeGStorable(CDev)+#endif