60
64
forList toH toA = decls ["NIL", "CONS"]
69
73
natToFrom hty to from = let
70
74
totxt = repl ["<<0>>", "<<1>>", hty] (concat
71
75
["let { f <<0>> = 0 :: <<2>>;"
74
78
fromtxt = repl ["<<0>>", "<<1>>", hty] (concat
75
79
["let { f x | x <= (0 :: <<2>>) = <<0>>"
78
82
in decls ["ZERO", "SUC"] to totxt from fromtxt