GHC.Tc.Deriv.Functor

ghc-9.0.0.20201227: The GHC API

Safe Haskell | None
Language | Haskell2010

GHC.Tc.Deriv.Functor

Description

The deriving code for the Functor, Foldable, and Traversable classes

# Documentation

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. The `[a]` is the result of folding over the arguments of the tuple. ft_ty_app :: Type -> Type -> a -> a Type app, variable only in last argument. The two `Type`s are the function and argument parts of `fun_ty arg_ty`, respectively. 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 #

gen_Functor_binds :: SrcSpan -> TyCon -> (LHsBinds GhcPs, BagDerivStuff) Source #

gen_Foldable_binds :: SrcSpan -> TyCon -> (LHsBinds GhcPs, BagDerivStuff) Source #

gen_Traversable_binds :: SrcSpan -> TyCon -> (LHsBinds GhcPs, BagDerivStuff) Source #