cplug-0.2.0.0: Recompile and run partially applied C functions in Haskell, during runtime

Safe HaskellNone
LanguageHaskell2010

Parse.Templates

Synopsis

Documentation

data NamedVal a Source

Constructors

NameVal 

Fields

valName :: Text
 
value :: a
 

Instances

dumifyNamedVar :: NamedVar -> NamedVar Source

Converts a NamedVar to a dummy variable, e.g. int x to int dummy_x

update :: (a -> Maybe a) -> a -> a Source

class Typeable a => CTypeable a where Source

Methods

toCType :: a -> Text Source

toPtrTypeRep :: TypeRep -> TypeRep Source

Pseudocode illustrative example:

toPtrTypeRep Int == Ptr Int

applyTypeRep :: Typeable a => a -> TypeRep -> TypeRep Source

Get the TyCon type of the first argument and apply it to the TypeRep of the second

typeRepCons :: TyCon -> TypeRep -> TypeRep Source

Analogous to `(:)` for lists, where the element is a TyCon and the list is a TypeRep

typeConHead :: Typeable a => a -> TyCon Source

Get the head of a type, e.g.

>>> `typeRepHead (undefined :: IO Int)
IO