Is there a particular reason why only “top-level” fun
s without arguments are reified in the visualizer, but not those which either have an argument or are defined on a sig
?
For example, given the following spec:
sig Foo {}
sig Bar {}
fun baz: Foo -> Bar {
Foo -> Bar
}
fun quux[f: Foo]: Bar {
Bar
}
fun Foo.xyzzy: Bar {
Bar
}
run {} for 2 but exactly 2 Foo, 2 Bar
Only baz
will be shown in the visualizer, but not quux
or xyzzy
. So while I can style baz
to, for example, show related Bar
s on a Foo
, I cannot do the same with quux
and xyzzy
even though there is a natural interpretation of their outputs as attributes of Foo
.
Is this limitation fundamental in some way? If not, it seems like an easy way to improve usability, because otherwise you are forced to declare functions as top-level relations—which is less ergonomic—just to obtain better visualisation.