Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Core utils
Synopsis
- isUnboxableCon :: DataCon -> Bool
- isUnboxable :: VarType -> Bool
- data SlotCount
- slotCount :: SlotCount -> Int
- varSize :: VarType -> Int
- varSlotCount :: VarType -> SlotCount
- typeSize :: Type -> Int
- isVoid :: VarType -> Bool
- isPtr :: VarType -> Bool
- isSingleVar :: VarType -> Bool
- isMultiVar :: VarType -> Bool
- isMatchable :: [VarType] -> Bool
- tyConVt :: HasDebugCallStack => TyCon -> [VarType]
- idVt :: HasDebugCallStack => Id -> [VarType]
- typeVt :: HasDebugCallStack => Type -> [VarType]
- uTypeVt :: HasDebugCallStack => UnaryType -> VarType
- primRepVt :: HasDebugCallStack => PrimRep -> VarType
- typePrimRep' :: HasDebugCallStack => UnaryType -> [PrimRep]
- tyConPrimRep' :: HasDebugCallStack => TyCon -> [PrimRep]
- kindPrimRep' :: HasDebugCallStack => SDoc -> Kind -> [PrimRep]
- primTypeVt :: HasDebugCallStack => Type -> VarType
- argVt :: StgArg -> VarType
- dataConType :: DataCon -> Type
- isBoolDataCon :: DataCon -> Bool
- fixedLayout :: [VarType] -> CILayout
- stackSlotType :: Id -> VarType
- idPrimReps :: Id -> [PrimRep]
- typePrimReps :: Type -> [PrimRep]
- primRepSize :: PrimRep -> SlotCount
- assocPrimReps :: Outputable a => [PrimRep] -> [a] -> [(PrimRep, [a])]
- assocIdPrimReps :: Outputable a => Id -> [a] -> [(PrimRep, [a])]
- assocIdExprs :: Id -> [JExpr] -> [TypedExpr]
- might_be_a_function :: HasDebugCallStack => Type -> Bool
- mkArityTag :: Int -> Int -> Int
- toTypeList :: [VarType] -> [Int]
Documentation
isUnboxableCon :: DataCon -> Bool Source #
can we unbox C x to x, only if x is represented as a Number
isUnboxable :: VarType -> Bool Source #
one-constructor types with one primitive field represented as a JS Number can be unboxed
Number of slots occupied by a PrimRep
varSlotCount :: VarType -> SlotCount Source #
isSingleVar :: VarType -> Bool Source #
isMultiVar :: VarType -> Bool Source #
isMatchable :: [VarType] -> Bool Source #
can we pattern match on these values in a case?
typePrimRep' :: HasDebugCallStack => UnaryType -> [PrimRep] Source #
tyConPrimRep' :: HasDebugCallStack => TyCon -> [PrimRep] Source #
Find the primitive representation of a TyCon
. Defined here to
avoid module loops. Call this only on unlifted tycons.
kindPrimRep' :: HasDebugCallStack => SDoc -> Kind -> [PrimRep] Source #
Take a kind (of shape TYPE rr
) and produce the PrimRep
s
of values of types of this kind.
primTypeVt :: HasDebugCallStack => Type -> VarType Source #
dataConType :: DataCon -> Type Source #
isBoolDataCon :: DataCon -> Bool Source #
fixedLayout :: [VarType] -> CILayout Source #
stackSlotType :: Id -> VarType Source #
idPrimReps :: Id -> [PrimRep] Source #
typePrimReps :: Type -> [PrimRep] Source #
primRepSize :: PrimRep -> SlotCount Source #
assocPrimReps :: Outputable a => [PrimRep] -> [a] -> [(PrimRep, [a])] Source #
Associate the given values to each RrimRep in the given order, taking into account the number of slots per PrimRep
assocIdPrimReps :: Outputable a => Id -> [a] -> [(PrimRep, [a])] Source #
Associate the given values to the Id's PrimReps, taking into account the number of slots per PrimRep
assocIdExprs :: Id -> [JExpr] -> [TypedExpr] Source #
Associate the given JExpr to the Id's PrimReps, taking into account the number of slots per PrimRep
might_be_a_function :: HasDebugCallStack => Type -> Bool Source #
Return False only if we are *sure* it's a data type Look through newtypes etc as much as possible
toTypeList :: [VarType] -> [Int] Source #