c-storable-deriving 0.1 → 0.1.1
raw patch · 2 files changed
+2/−2 lines, 2 filesPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
API changes (from Hackage documentation)
- Foreign.CStorable: class CStorable a
+ Foreign.CStorable: class CStorable a where cPeek p = fmap to $ gcPeek (castPtr p) cPoke p x = gcPoke (castPtr p) $ from x cAlignment = gcAlignment . from cSizeOf = gcSizeOf . from
Files
Foreign/CStorable/TypeClass.hs view
@@ -80,4 +80,4 @@ cSizeOf :: a -> Int default cSizeOf :: (Generic a, GCStorable (Rep a)) => a -> Int- cSizeOf = gcAlignment . from+ cSizeOf = gcSizeOf . from
c-storable-deriving.cabal view
@@ -1,5 +1,5 @@ Name: c-storable-deriving-Version: 0.1+Version: 0.1.1 Synopsis: Generate C-like storable instances from datatypes Description: Automatically generates struct-rule based Storable instances based on the Generic typeclass.