Safe Haskell | None |
---|
- data AliasType
- boxPrimitive :: Monad m => DataTable -> E -> E -> m (E, (ExtType, E))
- collectDeriving :: [HsDecl] -> [(SrcLoc, Name, Name)]
- conSlots :: Constructor -> [E]
- constructionExpression :: DataTable -> Name -> E -> E
- data Constructor = Constructor {
- conName :: Name
- conType :: E
- conExpr :: E
- conOrigSlots :: [Slot]
- conInhabits :: Name
- conVirtual :: Maybe [Name]
- conChildren :: DataFamily
- conCTYPE :: Maybe ExtType
- data DataFamily
- = DataAbstract
- | DataNone
- | DataPrimitive
- | DataEnum !Int
- | DataNormal [Name]
- | DataAlias !AliasType
- newtype DataTable = DataTable (Map Name Constructor)
- class Monad m => DataTableMonad m where
- getDataTable :: m DataTable
- dataTablePrims :: DataTable
- deconstructionExpression :: UniqueProducer m => DataTable -> Name -> E -> [TVr] -> E -> m (Alt E)
- deriveClasses :: IdMap Comb -> DataTable -> [(SrcLoc, Name, Name)] -> [(TVr, E)]
- extractIO :: Monad m => E -> m E
- extractIO' :: E -> ([E], Bool, E)
- extractPrimitive :: Monad m => DataTable -> E -> m (E, (ExtType, E))
- data ExtTypeInfo
- extTypeInfoExtType :: ExtTypeInfo -> ExtType
- followAlias :: Monad m => DataTable -> E -> m E
- followAliases :: DataTable -> E -> E
- getConstructor :: Monad m => Name -> DataTable -> m Constructor
- getConstructorArities :: DataTable -> [(Name, Int)]
- getProduct :: Monad m => DataTable -> E -> m Constructor
- getSiblings :: DataTable -> Name -> Maybe [Name]
- lookupExtTypeInfo :: Monad m => DataTable -> E -> m ExtTypeInfo
- mktBox :: E -> E
- modBox :: Module
- numberSiblings :: DataTable -> Name -> Maybe Int
- onlyChild :: DataTable -> Name -> Bool
- pprintTypeOfCons :: (Monad m, DocLike a) => DataTable -> Name -> m a
- primitiveAliases :: Map Name Name
- removeNewtypes :: DataTable -> E -> E
- samplePrimitiveDataTable :: DataTable
- showDataTable :: DataTable -> Doc
- data Slot
- = SlotNormal E
- | SlotUnpacked E !Name [E]
- | SlotExistential TVr
- slotTypes :: DataTable -> Name -> E -> [E]
- slotTypesHs :: DataTable -> Name -> E -> [E]
- tAbsurd :: E -> E
- toDataTable :: Map Name Kind -> Map Name Type -> [HsDecl] -> DataTable -> DataTable
- typesCompatable :: forall m. Monad m => E -> E -> m ()
- updateLit :: DataTable -> Lit e t -> Lit e t
Documentation
conSlots :: Constructor -> [E]Source
data Constructor Source
Record describing a data type. * is also a data type containing the type constructors, which are unlifted, yet boxed.
Constructor | |
|
data DataFamily Source
class Monad m => DataTableMonad m whereSource
followAliases :: DataTable -> E -> ESource
getConstructor :: Monad m => Name -> DataTable -> m ConstructorSource
getConstructorArities :: DataTable -> [(Name, Int)]Source
getProduct :: Monad m => DataTable -> E -> m ConstructorSource
return the single constructor of product types
lookupExtTypeInfo :: Monad m => DataTable -> E -> m ExtTypeInfoSource
primitiveAliases :: Map Name NameSource
list of declared data types that map directly to primitive real types
removeNewtypes :: DataTable -> E -> ESource
showDataTable :: DataTable -> DocSource
conjured data types, these data types are created as needed and can be of any type, their actual type is encoded in their names.
Absurd - this is a type that it used to default otherwise unconstrained types, it is not special in any particular way but is just an arbitrary type to give to things.
Box - this type can be used to represent any boxed values. It is considered equivalent to all boxed values so is not a very precise type. It is used in the final stages of compilation before core mangling so that optimizations that were previously blocked by type variables can be carried out.
typesCompatable :: forall m. Monad m => E -> E -> m ()Source