lambda-calculator-3.1.1.0: A lambda calculus interpreter
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Lambda.SystemF.Expression

Documentation

data SystemFExpr name Source #

Constructors

Let name (SystemFExpr name)

A global binding: `let x = y`

Var name

Variable: x

VarAnn name (Ty name)

Variable annotated with type: `x:T`

App (SystemFExpr name) (SystemFExpr name)

Function application: `x y`

Abs name (Ty name) (SystemFExpr name)

Lambda abstraction: `x: X. x`

TyAbs name (SystemFExpr name)

Type Abstraction: `X. body`

TyApp (SystemFExpr name) (Ty name)

Type Application: `x [X]`

Instances

Instances details
Show name => Show (SystemFExpr name) Source # 
Instance details

Defined in Language.Lambda.SystemF.Expression

Methods

showsPrec :: Int -> SystemFExpr name -> ShowS #

show :: SystemFExpr name -> String #

showList :: [SystemFExpr name] -> ShowS #

Eq name => Eq (SystemFExpr name) Source # 
Instance details

Defined in Language.Lambda.SystemF.Expression

Methods

(==) :: SystemFExpr name -> SystemFExpr name -> Bool #

(/=) :: SystemFExpr name -> SystemFExpr name -> Bool #

Pretty name => Pretty (SystemFExpr name) Source # 
Instance details

Defined in Language.Lambda.SystemF.Expression

Methods

pretty :: SystemFExpr name -> Doc ann #

prettyList :: [SystemFExpr name] -> Doc ann #

data TypedExpr name Source #

Constructors

TypedExpr 

Fields

Instances

Instances details
Show name => Show (TypedExpr name) Source # 
Instance details

Defined in Language.Lambda.SystemF.Expression

Methods

showsPrec :: Int -> TypedExpr name -> ShowS #

show :: TypedExpr name -> String #

showList :: [TypedExpr name] -> ShowS #

Eq name => Eq (TypedExpr name) Source # 
Instance details

Defined in Language.Lambda.SystemF.Expression

Methods

(==) :: TypedExpr name -> TypedExpr name -> Bool #

(/=) :: TypedExpr name -> TypedExpr name -> Bool #

Pretty name => Pretty (TypedExpr name) Source # 
Instance details

Defined in Language.Lambda.SystemF.Expression

Methods

pretty :: TypedExpr name -> Doc ann #

prettyList :: [TypedExpr name] -> Doc ann #

data Ty name Source #

Constructors

TyVar name

Type variable (T)

TyArrow (Ty name) (Ty name)

Type arrow (T -> U)

TyForAll name (Ty name)

Universal type (forall T. X)

Instances

Instances details
Show name => Show (Ty name) Source # 
Instance details

Defined in Language.Lambda.SystemF.Expression

Methods

showsPrec :: Int -> Ty name -> ShowS #

show :: Ty name -> String #

showList :: [Ty name] -> ShowS #

Eq name => Eq (Ty name) Source # 
Instance details

Defined in Language.Lambda.SystemF.Expression

Methods

(==) :: Ty name -> Ty name -> Bool #

(/=) :: Ty name -> Ty name -> Bool #

Pretty name => Pretty (Ty name) Source # 
Instance details

Defined in Language.Lambda.SystemF.Expression

Methods

pretty :: Ty name -> Doc ann #

prettyList :: [Ty name] -> Doc ann #

_ty :: Lens' (TypedExpr name) (Ty name) Source #

prettyPrint :: Pretty pretty => pretty -> Text Source #

substituteTy :: Eq name => Ty name -> name -> Ty name -> Ty name Source #