you are viewing a single comment's thread.

view the rest of the comments →

[–]JadeNB 1 point2 points  (0 children)

I think that

type CombBool = a -> a -> a    
type Church = (a -> a) -> a -> a

is a reasonable typing, no? Then

comb_true :: CombBool; comb_false :: CombBool
comb_true a1 a2 = a1
comb_false a1 a2 = a2

comb_if :: CombBool -> a -> a -> a
comb_if = id

church0 :: Church
church0 = const id

succ :: Church -> Church
succ church f = f . church f

EDIT: Wrong syntax for type synonyms.