derive-storable-plugin-0.2.0.0: 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.Helpers

Description

Various helping functions.

Synopsis

Documentation

getIdsBind :: CoreBind -> [Id] Source #

Get ids from core bind.

getExprsBind :: CoreBind -> [CoreExpr] Source #

Get all expressions from a binding.

getIdsExprsBind :: CoreBind -> [(Id, CoreExpr)] Source #

Get both identifiers and expressions from a binding.

getIdsExpr :: CoreExpr -> [Id] Source #

Get all IDs from CoreExpr

cutOccName :: Int -> OccName -> OccName Source #

Takes first n characters out of occName

eqType :: Type -> Type -> Bool Source #

Equality for types

eqTyBind :: TyBinder -> TyBinder -> Bool Source #

Equality for type binders

elemType :: Type -> [Type] -> Bool Source #

elem function for types