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

Safe HaskellNone

CLaSH.Core.Type

Description

Types in CoreHW

Synopsis

Documentation

data Type Source

Types in CoreHW: function and polymorphic types

Constructors

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

Constructors

FunTy Type Type

Function type

TyConApp TyCon [Type]

Applied TyCon

OtherType Type

Neither of the above

Instances

data ConstTy Source

Type Constants

Constructors

TyCon TyCon

TyCon type

Arrow

Function type

Instances

data LitTy Source

Literal Types

Constructors

NumTy Int 
SymTy String 

Instances

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