Here, it is the source code to output church number. As I compiler, it occurs an error message:
parse error (possibly incorrect indentation or mismatched brackets)
I have no idea. Anyone can help? Thanks
module Main where
type Church a = (a -> a) -> a -> a
church :: Integer -> Church Integer
church 0 = \f -> \x -> x
church n = \f -> \x -> f (church (n-1) f x)
let r = church 0
main = print (r)