derive-storable-plugin-0.2.3.3: GHC core plugin supporting the derive-storable package.
Copyright(c) Mateusz Kłoczko 2016
LicenseMIT
Maintainermateusz.p.kloczko@gmail.com
Stabilityexperimental
PortabilityGHC-only
Safe HaskellNone
LanguageHaskell2010

Foreign.Storable.Generic.Plugin.Internal.Types

Description

Functions for obtaining types from GStorable methods and instances.

Synopsis

Documentation

isIntType :: Type -> Bool Source #

Check whether the type is integer

isPtrType :: Type -> Bool Source #

Check whether the type is a Pointer

isIOType :: Type -> Bool Source #

Check whether the type is a IO.

isIOTyCon :: TyCon -> Bool Source #

Check whether the type constructor is an IO.

isStatePrimType :: Type -> Bool Source #

Check whether the type is a State#

isStatePrimTyCon :: TyCon -> Bool Source #

Check whether the type constructor is a State#

isRealWorldType :: Type -> Bool Source #

Check whether the type is a RealWorld#

isRealWorldTyCon :: TyCon -> Bool Source #

Check whether the type constructor is a RealWorld#

isGStorableInstTyCon :: TyCon -> Bool Source #

Check whether the type constuctor is a GStorable

hasConstraintKind :: Type -> Bool Source #

Check whether the type is of kind * -> Constraint.

hasGStorableConstraints :: Type -> Bool Source #

Check whether the type has GStorable constraints.

getGStorableInstType :: Type -> Maybe Type Source #

Get the type from GStorable instance.

getAlignmentType :: Type -> Maybe Type Source #

Get the type from GStorable alignment method

getSizeType :: Type -> Maybe Type Source #

Get the type from GStorable sizeOf method

getPeekType :: Type -> Maybe Type Source #

Get the type from GStorable peek method

getPokeType :: Type -> Maybe Type Source #

Get the type from GStorable poke method

getOffsetsType :: Type -> Maybe Type Source #

Get the type of Offsets. Assuming it is [Int]

getGStorableType :: Type -> Maybe Type Source #

Combination of type getters for all GStorables.

getGStorableMethodType :: Type -> Maybe Type Source #

Combination of type getters for GStorable methods.