ghc-7.10.2: The GHC API

Safe Haskell | None
Language | Haskell2010

Class

Synopsis

- data Class
- type ClassOpItem = (Id, DefMeth)
- data DefMeth
  - = NoDefMeth
  - | DefMeth Name
  - | GenDefMeth Name
- data ClassATItem = ATI TyCon (Maybe Type)
- type ClassMinimalDef = BooleanFormula Name
- 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] -> ClassMinimalDef -> 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
- classMinimalDef :: Class -> ClassMinimalDef

# Documentation

data Class Source

Instances

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

type ClassOpItem = (Id, DefMeth) Source

data DefMeth Source

Constructors

NoDefMeth |
DefMeth Name |
GenDefMeth Name |

Instances

Eq DefMeth |
Outputable DefMeth |

data ClassATItem Source

Constructors

ATI TyCon (Maybe Type) |

type ClassMinimalDef = BooleanFormula Name Source

defMethSpecOfDefMeth :: DefMeth -> DefMethSpec Source

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

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

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

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

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

classTyVars :: Class -> [TyVar] Source

classArity :: Class -> Arity Source

classKey :: Class -> Unique Source

className :: Class -> Name Source

classATs :: Class -> [TyCon] Source

classATItems :: Class -> [ClassATItem] Source

classTyCon :: Class -> TyCon Source

classMethods :: Class -> [Id] Source

classOpItems :: Class -> [ClassOpItem] Source

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

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

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

classSCTheta :: Class -> [PredType] Source

classAllSelIds :: Class -> [Id] Source

classSCSelId :: Class -> Int -> Id Source

classMinimalDef :: Class -> ClassMinimalDef Source