LicenseGPL-3
Safe HaskellSafe

Ski

Description

This module implements a representation of the SKI subset of the calculus of combinators. It provides a lambda abstraction algorithm writing lambda expressions as combinators.

Synopsis

Documentation

data Ski Source #

A SKI combinator expression

Constructors

S 
K 
I 
Comb Ski Ski 
Cte String 
Spair 
Spi1 
Spi2 
Sinl 
Sinr 
Scase 
Sunit 
Sabort 
Sabsurd 

Instances

Eq Ski Source # 

Methods

(==) :: Ski -> Ski -> Bool

(/=) :: Ski -> Ski -> Bool

Ord Ski Source # 

Methods

compare :: Ski -> Ski -> Ordering

(<) :: Ski -> Ski -> Bool

(<=) :: Ski -> Ski -> Bool

(>) :: Ski -> Ski -> Bool

(>=) :: Ski -> Ski -> Bool

max :: Ski -> Ski -> Ski

min :: Ski -> Ski -> Ski

Show Ski Source # 

Methods

showsPrec :: Int -> Ski -> ShowS

show :: Ski -> String

showList :: [Ski] -> ShowS

skiabs :: NamedLambda -> Ski Source #

SKI abstraction of a named lambda term. From a lambda expression creates a SKI equivalent expression. The following algorithm is a version of the algorithm 9.10 on the Hindley-Seldin book.