ghc-8.0.2: The GHC API

Safe Haskell | None
Language | Haskell2010

TcGenDeriv

# Documentation

type BagDerivStuff = Bag DerivStuff Source #

data DerivStuff Source #

Constructors

DerivAuxBind AuxBindSpec |
DerivFamInst FamInst |
DerivHsBind (LHsBind RdrName, LSig RdrName) |
DerivInst (InstInfo RdrName) |

hasBuiltinDeriving :: DynFlags -> (Name -> Fixity) -> Class -> Maybe (SrcSpan -> TyCon -> (LHsBinds RdrName, BagDerivStuff)) Source #

data FFoldType a Source #

Constructors

FT |
Fields ft_triv :: a Does not contain variable ft_var :: a The variable itself ft_co_var :: a The variable itself, contravariantly ft_fun :: a -> a -> a Function type ft_tup :: TyCon -> [a] -> a Tuple type ft_ty_app :: Type -> a -> a Type app, variable only in last argument ft_bad_app :: a Type app, variable other than in last argument ft_forall :: TcTyVar -> a -> a Forall type

functorLikeTraverse Source #

Arguments

:: TyVar | Variable to look for
-> FFoldType a | How to fold
-> Type | Type to process
-> a |

deepSubtypesContaining :: TyVar -> Type -> [TcType] Source #

foldDataConArgs :: FFoldType a -> DataCon -> [a] Source #

mkCoerceClassMethEqn :: Class -> [TyVar] -> [Type] -> Type -> Id -> Pair Type Source #

gen_Newtype_binds :: SrcSpan -> Class -> [TyVar] -> [Type] -> Type -> LHsBinds RdrName Source #

genAuxBinds :: SrcSpan -> BagDerivStuff -> SeparateBagsDerivStuff Source #

ordOpTbl :: [(Type, (RdrName, RdrName, RdrName, RdrName, RdrName))] Source #

boxConTbl :: [(Type, RdrName)] Source #

litConTbl :: [(Type, LHsExpr RdrName -> LHsExpr RdrName)] Source #

mkRdrFunBind :: Located RdrName -> [LMatch RdrName (LHsExpr RdrName)] -> LHsBind RdrName Source #