I was reading the "Fun with functional dependencies"
This part is said to statically computed ie performed at the compile time
data Nat = Zero | Succ Nat
three = Succ(Succ(Succ Zero)))
even Zero = True
even (Succ n) = odd n
odd Zero = False
odd (Succ n) = even n
(odd three)
But I don't quite get what would be statically computed. And I also don't find anything unusual the compiler to compute to check types
Nothing in that code is computed statically. Note that the code you've posted is from the section "Dynamic Computation", not "Static Computation".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With