| Safe Haskell | None |
|---|
System.Plugins.MultiStage
Description
Generic components
- loadFunWithConfig :: Config -> Name -> Q [Dec]
- loadFunType :: Name -> Q Type
- data Config = Config {}
- defaultConfig :: Config
- data CallConv = CallConv {}
- buildType :: CallConv -> Type -> Q Type
- applyTF :: Name -> Type -> Q Type
- expandTF :: Type -> Q Type
- pack :: (Reference (Rep a), Marshal a) => a -> IO (Ref (Rep a))
- unpack :: (Reference (Rep a), Marshal a) => Ref (Rep a) -> IO a
- class Reference a where
- class Marshal a where
Loading
loadFunType :: Name -> Q TypeSource
Extract the type of the supplied function name
Configuration
Configuration parameters for the function loader
Calling Convention
The Calling Convention specifies how a type should be converted
applyTF :: Name -> Type -> Q TypeSource
Apply a type family
Walk the type and apply the type family to every element that is an
instance of tf
Marshaling
pack :: (Reference (Rep a), Marshal a) => a -> IO (Ref (Rep a))Source
Pack a value into its runtime representation
pack a = to a >>= ref
unpack :: (Reference (Rep a), Marshal a) => Ref (Rep a) -> IO aSource
Unpack a value from its runtime representation
unpack a = deref a >>= from
Optionally make a refrence of a value
Methods
Convert to a referenced value
Convert from a referenced value
In the IO monad to allow peeking through the reference.
Instances
| Reference Bool | |
| Reference Double | |
| Reference Float | |
| Reference Int8 | |
| Reference Int16 | |
| Reference Int32 | |
| Reference Int64 | |
| Reference Word8 | |
| Reference Word16 | |
| Reference Word32 | |
| Reference Word64 | |
| Storable (a, b) => Reference (a, b) | |
| Storable (a, b, c) => Reference (a, b, c) | |
| Storable (a, b, c, d) => Reference (a, b, c, d) | |
| Storable (a, b, c, d, e) => Reference (a, b, c, d, e) | |
| Storable (a, b, c, d, e, f) => Reference (a, b, c, d, e, f) | |
| Storable (a, b, c, d, e, f, g) => Reference (a, b, c, d, e, f, g) |
Convert between Haskell and representation types
Instances
| Marshal Bool | |
| Marshal Double | |
| Marshal Float | |
| Marshal Int8 | |
| Marshal Int16 | |
| Marshal Int32 | |
| Marshal Int64 | |
| Marshal Word8 | |
| Marshal Word16 | |
| Marshal Word32 | |
| Marshal Word64 | |
| (Marshal a, Marshal b) => Marshal (a, b) | |
| (Marshal a, Marshal b, Marshal c) => Marshal (a, b, c) | |
| (Marshal a, Marshal b, Marshal c, Marshal d) => Marshal (a, b, c, d) | |
| (Marshal a, Marshal b, Marshal c, Marshal d, Marshal e) => Marshal (a, b, c, d, e) | |
| (Marshal a, Marshal b, Marshal c, Marshal d, Marshal e, Marshal f) => Marshal (a, b, c, d, e, f) | |
| (Marshal a, Marshal b, Marshal c, Marshal d, Marshal e, Marshal f, Marshal g) => Marshal (a, b, c, d, e, f, g) |