[isabelle] Is this overloading?



Hi,

If I want to overload a function foo, could I do the following?

typedecl bar

axiomatization
foo :: "'a => int"
where
"foo (x::bar) = 0" and
"foo (x::real) = 1" and
"foo (x::nat) = 2"

I'm feeling that it's at least a sloppy way of overloading. How
different is this compared to the proper way of overloading?

Thanks

John





This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.