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

Safe HaskellNone

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 TmName 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

Instances

Eq Term 
Ord Term 
Show Term 
Rep Term 
Alpha Term 
Pretty Term 
(Sat (ctx0 Type), Sat (ctx0 TmName), Sat (ctx0 DataCon), Sat (ctx0 Literal), Sat (ctx0 (Bind Id Term)), Sat (ctx0 (Bind TyVar Term)), Sat (ctx0 Term), Sat (ctx0 (Bind (Rec [LetBinding]) Term)), Sat (ctx0 [Bind Pat Term])) => Rep1 ctx0 Term 
Subst Term TyCon 
Subst Term Term 
Subst Term Type 
Subst Term TyVar 
Subst Term Id 
Subst Term DataCon 
Subst Term PrimRep 
Subst Term AlgTyConRhs 
Subst Term Literal 
Subst Term Pat 
Subst Term LitTy 
Subst Term ConstTy 
Subst Type Term 
Subst Type Id 
Pretty (Var Term) 
Pretty (Id, Term) 

type TmName = Name TermSource

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

Instances

Show Pat 
Rep Pat 
Alpha Pat 
Pretty Pat 
(Sat (ctx0 (Embed DataCon)), Sat (ctx0 (Rebind [TyVar] [Id])), Sat (ctx0 (Embed Literal))) => Rep1 ctx0 Pat 
Subst Term Pat 
Subst Type Pat