For example, the function 'compare' in Demo.pig is written as:
let compare (x : Nat)(y : Nat)(P : Nat -> Nat -> Set)(l : (x : Nat)(y : Nat) ->
P x (plus x ('suc y)))(e : (x : Nat) -> P x x)(g : (x : Nat)(y : Nat) -> P
(plus y ('suc x)) y) : P x y ;
<= Nat.Ind x ;
<= Nat.Ind y ;
define compare 'zero 'zero P l e g := e 'zero ;
define compare 'zero ('suc k) P l e g := l 'zero k ;
<= Nat.Ind y ;
(...)
It would be more nicely written:
let compare (x : Nat)(y : Nat)
(P : Nat -> Nat -> Set)
(l : (x : Nat)(y : Nat) -> P x (plus x ('suc y)))
(e : (x : Nat) -> P x x)
(g : (x : Nat)(y : Nat) -> P (plus y ('suc x)) y) : P x y ;
<= Nat.Ind x ;
<= Nat.Ind y ;
define compare 'zero 'zero P l e g := e 'zero ;
define compare 'zero ('suc k) P l e g := l 'zero k ;
<= Nat.Ind y ;
(...)
Or something similar. Remember: spaces are stripped off, you can do whatever
you want.
Original issue reported on code.google.com by pedag...@gmail.com on 7 Sep 2010 at 11:17
Original issue reported on code.google.com by
pedag...@gmail.com
on 7 Sep 2010 at 11:17