Fun vs fn

In ATS, non-termination (ntm) is considered a kind of effect.
Any function declared using the keyword ‘fun’ is assumed to have
the ntm effect unless a termination metric is provided.

fn foo (…) …

is just a shorthand for

fun foo .<>. (…) …

where .<>. is the empty termination metric.

For most uses, the difference btween fn and fun is probably irrelevant.On Friday, April 11, 2014 3:08:11 AM UTC-4, Yves Dorfsman wrote:

In the ATS book, it says:

“Therefore, a non-recursive function is just a special kind of of
recursive
function: the kind that does not make any calls to itself in its body.”

But then a recursive function is defined differently than a non-recursive
(fun
vs fn). Why is that? Is this to help the compiler?

What would be the impact of bind a non-recursive function with “fun”?

Thanks.


Yves.