clash-lib- CAES Language for Synchronous Hardware - As a Library

Safe HaskellNone



Types in CoreHW



data Type Source

Types in CoreHW: function and polymorphic types


VarTy Kind TyName

Type variable

ConstTy ConstTy

Type constant

ForAllTy (Bind TyVar Type)

Polymorphic Type

AppTy Type Type

Type Application

LitTy LitTy

Type literal

data TypeView Source

An easier view on types


FunTy Type Type

Function type

TyConApp TyCon [Type]

Applied TyCon

OtherType Type

Neither of the above


data ConstTy Source

Type Constants


TyCon TyCon

TyCon type


Function type


data LitTy Source

Literal Types


NumTy Int 
SymTy String 


Show LitTy 
Rep LitTy 
Alpha LitTy 
Pretty LitTy 
(Sat (ctx0 Int), Sat (ctx0 String)) => Rep1 ctx0 LitTy 
Subst Term LitTy 
Subst Type LitTy 

type Kind = TypeSource

The level above types

type KindOrType = TypeSource

Either a Kind or a Type

type KiName = Name KindSource

Reference to a Kind

type TyName = Name TypeSource

Reference to a Type

type TyVar = Var TypeSource

Type variable

tyView :: Type -> TypeViewSource

An easier view on types

coreView :: Type -> TypeViewSource

A view on types in which Signal types and newtypes are transparent

transparentTy :: Type -> TypeSource

A transformation that renders Signal types transparent

typeKind :: Type -> KindSource

Determine the kind of a type

mkTyConTy :: TyCon -> TypeSource

Make a Type out of a TyCon

mkFunTy :: Type -> Type -> TypeSource

Make a function type of an argument and result type

mkTyConApp :: TyCon -> [Type] -> TypeSource

Make a TyCon Application out of a TyCon and a list of argument types

splitFunTy :: Type -> Maybe (Type, Type)Source

Split a function type in an argument and result type

splitFunForallTy :: Type -> ([Either TyVar Type], Type)Source

Split a poly-function type in a: list of type-binders and argument types, and the result type

splitTyConAppM :: Type -> Maybe (TyCon, [Type])Source

Split a TyCon Application in a TyCon and its arguments

isPolyTy :: Type -> BoolSource

Is a type polymorphic?

isFunTy :: Type -> BoolSource

Is a type a function type?

applyFunTy :: Type -> Type -> TypeSource

Apply a function type to an argument type and get the result type

applyTy :: Fresh m => Type -> KindOrType -> m TypeSource

Substitute the type variable of a type (ForAllTy) with another type