ddc-core-0.4.3.1: Disciplined Disciple Compiler core language and type checker.

Safe HaskellSafe
LanguageHaskell98

DDC.Type.Exp.Generic.Binding

Synopsis

Documentation

class Binding l where Source #

Class of languages that include name binding.

Minimal complete definition

boundOfBind, boundMatchesBind

Methods

boundOfBind :: l -> GTBindVar l -> GTBoundVar l Source #

Get the bound occurrence that matches the given binding occurrence.

boundMatchesBind :: l -> GTBindVar l -> GTBoundVar l -> Bool Source #

Check if the given bound occurence matches a binding occurrence.

class Anon l where Source #

Class of languages that support anonymous binding.

Minimal complete definition

withBindings

Methods

withBinding :: l -> (GTBindVar l -> GTBoundVar l -> a) -> a Source #

Evaluate a function given a new anonymous binding and matching bound occurrence.

withBindings :: l -> Int -> ([GTBindVar l] -> [GTBoundVar l] -> a) -> a Source #