ghc-8.0.2: The GHC API

Safe Haskell | None
Language | Haskell2010

TcDeriv

Synopsis

- tcDeriving :: [DerivInfo] -> [LDerivDecl Name] -> TcM (TcGblEnv, Bag (InstInfo Name), HsValBinds Name)
- data DerivInfo = DerivInfo {
  - di_rep_tc :: TyCon
  - di_preds :: [LHsSigType Name]
  - di_ctxt :: SDoc
  }
- mkDerivInfos :: [TyClGroup Name] -> TcM [DerivInfo]

# Documentation

tcDeriving :: [DerivInfo] -> [LDerivDecl Name] -> TcM (TcGblEnv, Bag (InstInfo Name), HsValBinds Name) Source #

data DerivInfo Source #

Stuff needed to process a `deriving` clause

Constructors

DerivInfo |
Fields di_rep_tc :: TyCon The data tycon for normal datatypes, or the *representation* tycon for data families di_preds :: [LHsSigType Name] di_ctxt :: SDoc error context

mkDerivInfos :: [TyClGroup Name] -> TcM [DerivInfo] Source #

Extract `deriving` clauses of proper data type (skips data families)