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

Safe HaskellNone
LanguageHaskell2010

CLaSH.Core.Term

Description

Term representation in the CoreHW language: System F + LetRec + Case

Synopsis

Documentation

data Term Source

Term representation in the CoreHW language: System F + LetRec + Case

Constructors

Var !Type !TmName

Variable reference

Data !DataCon

Datatype constructor

Literal !Literal

Literal

Prim !Text !Type

Primitive

Lam !(Bind Id Term)

Term-abstraction

TyLam !(Bind TyVar Term)

Type-abstraction

App !Term !Term

Application

TyApp !Term !Type

Type-application

Letrec !(Bind (Rec [LetBinding]) Term)

Recursive let-binding

Case !Term !Type [Bind Pat Term]

Case-expression: subject, type of alternatives, list of alternatives

type TmName = Name Term Source

Term reference

type LetBinding = (Id, Embed Term) Source

Binding in a LetRec construct

data Pat Source

Patterns in the LHS of a case-decomposition

Constructors

DataPat !(Embed DataCon) !(Rebind [TyVar] [Id])

Datatype pattern, '[TyVar]' bind existentially-quantified type-variables of a DataCon

LitPat !(Embed Literal)

Literal pattern

DefaultPat

Default pattern