ddc-source-tetra-0.4.2.1: Disciplined Disciple Compiler source language.

Safe HaskellNone
LanguageHaskell98

DDC.Source.Tetra.Exp.Annot

Contents

Synopsis

Documentation

data Annot a Source

Type index for annotated expression type.

Instances

HasAnonBind (Annot a) Source 
type GPrim (Annot a) = PrimVal Source 
type GBound (Annot a) = Bound Name Source 
type GBind (Annot a) = Bind Name Source 
type GAnnot (Annot a) = a Source 
type GName (Annot a) = Name Source 

class HasAnonBind l where Source

Methods

isAnon :: l -> GBind l -> Bool Source

Instances

Expressions

data Name Source

Names of things used in Disciple Source Tetra.

type Exp a = GExp (Annot a) Source

type Lets a = GLets (Annot a) Source

type Alt a = GAlt (Annot a) Source

type Pat a = GPat (Annot a) Source

type Clause a = GClause (Annot a) Source

type Guard a = GGuard (Annot a) Source

type Cast a = GCast (Annot a) Source

data DaCon n :: * -> *

Data constructors.

Constructors

DaConUnit

Baked in unit data constructor.

DaConPrim

Primitive data constructor used for literals and baked-in constructors.

The type of the constructor needs to be attached to handle the case where there are too many constructors in the data type to list, like for Int literals. In this case we determine what data type it belongs to from the attached type of the data constructor.

Fields

daConName :: !n

Name of the data constructor.

daConType :: !(Type n)

Type of the data constructor.

DaConBound

Data constructor that has a data type declaration.

Fields

daConName :: !n

Name of the data constructor.

Instances

Eq n => Eq (DaCon n) 
Show n => Show (DaCon n) 
NFData n => NFData (DaCon n) 

Witnesses

type WiCon a = GWiCon (Annot a) Source