ghc-7.6.3: The GHC API

Safe Haskell | None

Class

Synopsis

- data Class
- type ClassOpItem = (Id, DefMeth)
- data DefMeth
  - = NoDefMeth
  - | DefMeth Name
  - | GenDefMeth Name
- type ClassATItem = (TyCon, [ATDefault])
- data ATDefault = ATD {
  - atDefaultTys :: [TyVar]
  - atDefaultPats :: [Type]
  - atDefaultRhs :: Type
  - atDefaultSrcSpan :: SrcSpan
  }
- defMethSpecOfDefMeth :: DefMeth -> DefMethSpec
- type FunDep a = ([a], [a])
- pprFundeps :: Outputable a => [FunDep a] -> SDoc
- pprFunDep :: Outputable a => FunDep a -> SDoc
- mkClass :: [TyVar] -> [([TyVar], [TyVar])] -> [PredType] -> [Id] -> [ClassATItem] -> [ClassOpItem] -> TyCon -> Class
- classTyVars :: Class -> [TyVar]
- classArity :: Class -> Arity
- classKey :: Class -> Unique
- className :: Class -> Name
- classATs :: Class -> [TyCon]
- classATItems :: Class -> [ClassATItem]
- classTyCon :: Class -> TyCon
- classMethods :: Class -> [Id]
- classOpItems :: Class -> [ClassOpItem]
- classBigSig :: Class -> ([TyVar], [PredType], [Id], [ClassOpItem])
- classExtraBigSig :: Class -> ([TyVar], [FunDep TyVar], [PredType], [Id], [ClassATItem], [ClassOpItem])
- classTvsFds :: Class -> ([TyVar], [FunDep TyVar])
- classSCTheta :: Class -> [PredType]
- classAllSelIds :: Class -> [Id]
- classSCSelId :: Class -> Int -> Id

# Documentation

data Class

Instances

Eq Class |
Data Class |
Ord Class |
Typeable Class |
Outputable Class |
Uniquable Class |
NamedThing Class |

type ClassOpItem = (Id, DefMeth)

data DefMeth

Constructors

NoDefMeth |
DefMeth Name |
GenDefMeth Name |

Instances

Eq DefMeth |
Outputable DefMeth |

type ClassATItem = (TyCon, [ATDefault])

data ATDefault

Constructors

ATD |
Fields atDefaultTys :: [TyVar] atDefaultPats :: [Type] atDefaultRhs :: Type atDefaultSrcSpan :: SrcSpan

defMethSpecOfDefMeth :: DefMeth -> DefMethSpec

Convert a `DefMethSpec` to a `DefMeth`, which discards the name field in the `DefMeth` constructor of the `DefMeth`.

type FunDep a = ([a], [a])

pprFundeps :: Outputable a => [FunDep a] -> SDoc

pprFunDep :: Outputable a => FunDep a -> SDoc

mkClass :: [TyVar] -> [([TyVar], [TyVar])] -> [PredType] -> [Id] -> [ClassATItem] -> [ClassOpItem] -> TyCon -> Class

classTyVars :: Class -> [TyVar]

classArity :: Class -> Arity

classKey :: Class -> Unique

className :: Class -> Name

classATs :: Class -> [TyCon]

classATItems :: Class -> [ClassATItem]

classTyCon :: Class -> TyCon

classMethods :: Class -> [Id]

classOpItems :: Class -> [ClassOpItem]

classBigSig :: Class -> ([TyVar], [PredType], [Id], [ClassOpItem])

classExtraBigSig :: Class -> ([TyVar], [FunDep TyVar], [PredType], [Id], [ClassATItem], [ClassOpItem])

classTvsFds :: Class -> ([TyVar], [FunDep TyVar])

classSCTheta :: Class -> [PredType]

classAllSelIds :: Class -> [Id]

classSCSelId :: Class -> Int -> Id