Popularity
5.5
Declining
Activity
0.0
Stable
9
1
4
Monthly Downloads: 39
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
Tags:
Foreign
c-storable-deriving alternatives and similar packages
Based on the "Foreign" category.
Alternatively, view c-storable-deriving alternatives based on common mentions on social networks and blogs.
-
language-c-inline
Inline C & Objective-C code in Haskell for language interoperability -
AppleScript
Call AppleScript from Haskell, and then call back into Haskell. -
hslua-module-system
Lua module wrapper around Haskell's System module. -
marshal-contt
A ContT-based wrapper for Haskell-to-C marshalling functions. -
hslua-module-doclayout
Lua module wrapping Text.DocLayout. -
foreign-storable-asymmetric
Types and instances for implementing a Storable with different peek and poke
Get performance insights in less than 4 minutes
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Sponsored
scoutapm.com
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest. Visit our partner's website for more details.
Do you think we are missing an alternative of c-storable-deriving or a related project?
README
c-storable-deriving
This library is intended to make generating C-like storable instances from datatypes easy.
Example
{-# LANGUAGE DeriveGeneric, DeriveAnyClass #-}
import GHC.Generics (Generic(..))
import Foreign (Storable(..))
import Foreign.CStorable (CStorable(..))
-- | a two-dimensional point.
-- Compatible with both OSX's @[email protected] and Window's @[email protected]
data Point = Point
{ x :: Double
, y :: Double
} deriving (Generic, CStorable)
instance Storable Point where
peek = cPeek
poke = cPoke
alignment = cAlignment
sizeOf = cSizeOf
See the haddocks for further details: Foreign.CStorable