As far as I know, the only difference between prfun (and prfn and praxi) and fun (and fn), is that the former is erased after type‑checking, so that the latter cannot rely on the former to generate dynamic values.
But I noticed a difference regarding syntax, and I wonder if it's on purpose or not.
extern praxi axiom_a_eq_a(): {a:int}[a == a] void
prval axiom_a_eq_a = axiom_a_eq_a()
prval () = axiom_a_eq_a{1}
Nothing new here.
Then, for who-know what ever reason, I had the idea to try this shorter variant:
extern praxi axiom_a_eq_a: {a:int}[a == a] void
prval () = axiom_a_eq_a{1}
(notice the `praxi` signature does not follow the syntax of a function, as there is no `()`) To my surprise, ATS did not complained.
So I wanted to try the same with a regular function, and here, ATS complained (as expected):
… it complained “the function may need to be declard as a value”.
i find the specific prfun/praxi shorthand above very convenient, and only wanted to know if it's on purpose, as it is otherwise supposed to be like a function definition.
P.S. There is a spelling mistake in the error message from ATS “declard” should be “declared”… an E is missing.