pdrt-sandbox-0.1.1: (Projective) Discourse Representation Theory
Copyright(c) Harm Brouwer and Noortje Venhuizen
LicenseApache-2.0
Maintainerme@hbrouwer.eu, n.j.venhuizen@rug.nl
Stabilityprovisional
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell98

Data.DRS.LambdaCalculus

Description

DRS lambda calculus; alpha conversion, beta reduction, and function composition

Synopsis

Exported

Type classes

class DRSAtom a #

Type class for a DRSAtom, which is either a DRS or a DRSRef.

Instances

Instances details
DRSAtom DRS # 
Instance details

Defined in Data.DRS.LambdaCalculus

DRSAtom DRSRef # 
Instance details

Defined in Data.DRS.LambdaCalculus

class AbstractDRS a #

Type class for an AbstractDRS, which is either a resolved DRS, or an 'unresolved DRS' that takes a DRSAtom and yields an AbstractDRS.

Instances

Instances details
AbstractDRS DRS # 
Instance details

Defined in Data.DRS.LambdaCalculus

(DRSAtom a, AbstractDRS b) => AbstractDRS (a -> b) # 
Instance details

Defined in Data.DRS.LambdaCalculus

Alpha Conversion

drsAlphaConvert :: DRS -> [(DRSRef, DRSRef)] -> DRS #

Applies alpha conversion to a DRS on the basis of a conversion list for DRSRefs rs.

renameVar :: Eq a => a -> [(a, a)] -> a #

Renames a variable v, iff v occurs in a variable conversion list. Otherwise, v is returned unmodified

Beta Reduction

drsBetaReduce :: (AbstractDRS a, DRSAtom b) => (b -> a) -> b -> a #

Apply beta reduction on an AbstractDRS with a DRSAtom.

(<<@>>) :: (AbstractDRS a, DRSAtom b) => (b -> a) -> b -> a #

Infix notation for drsBetaReduce

Function Composition

drsFunctionCompose :: (b -> c) -> (a -> b) -> a -> c #

Apply function composition to two 'unresolved DRS's, yielding a new 'unresolved DRS'

(<<.>>) :: (b -> c) -> (a -> b) -> a -> c #

Infix notation for drsFunctionCompose

DRS Purification

drsPurify :: DRS -> DRS #

Converts a DRS into a pure DRS by purifying its DRSRefs, where:

A DRS is pure iff:
  • There are no occurrences of duplicate, unbound uses of the same DRSRef.

Private

DRS renaming

Purifying DRSRefs