HaskellWiki

Haskell | Wiki community | Recent changes
Random page | Special pages

 

Not logged in
Log in | Help

Note: new account creation has been disabled as an anti-spam measure.

Chaitin's construction/Combinatory logic

< Chaitin's construction

Categories: Theoretical foundations

Contents


Combinatory logic term modules

1 CL

 module CL (CL, k, s, apply) where
 
 import Tree (Tree (Leaf, Branch))
 import BaseSymbol (BaseSymbol, kay, ess)
 
 type CL = Tree BaseSymbol 
 
 k, s :: CL
 k = Leaf kay
 s = Leaf ess
 
 apply :: CL -> CL -> CL
 apply = Branch

2 CL extension

 module CLExt ((>>@)) where
 
 import CL (CL, apply)
 import Control.Monad (Monad, liftM2)
 
 (>>@) :: Monad m => m CL -> m CL -> m CL
 (>>@) = liftM2 apply

3 Base symbol

 module BaseSymbol (BaseSymbol, kay, ess) where
 
 data BaseSymbol = K | S
 
 kay, ess :: BaseSymbol
 kay = K
 ess = S

Retrieved from "http://www.haskell.org/haskellwiki/Chaitin%27s_construction/Combinatory_logic"

This page has been accessed 1,576 times. This page was last modified 14:34, 4 August 2006. Recent content is available under a simple permissive license.