ghc-8.2.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_clauses :: [LHsDerivingClause Name]
  - di_ctxt :: SDoc
  }
- mkDerivInfos :: [LTyClDecl Name] -> TcM [DerivInfo]

# Documentation

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

data DerivInfo #

Stuff needed to process a datatype's `deriving` clauses

Constructors

DerivInfo |

Fields

- di_rep_tc :: TyCon

  The data tycon for normal datatypes, or the *representation* tycon for data families

- di_clauses :: [LHsDerivingClause Name]
- di_ctxt :: SDoc

  error context

mkDerivInfos :: [LTyClDecl Name] -> TcM [DerivInfo] #

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