Simple Godel encoding scheme in Haskell