data Thing = One | Two;
define f: Thing -> () = \x. case Thing of One -> f Two | Two -> ();
f One
Currently the FGG backend sees that f is recursive and uses matrix inversion to find the sum-product. It would be nice if somehow it could recognize that the recursion is bounded and therefore avoid the matrix inversion.
An example of how the recursion could be transformed away is to specialize f for different arguments:
Currently the FGG backend sees that
f
is recursive and uses matrix inversion to find the sum-product. It would be nice if somehow it could recognize that the recursion is bounded and therefore avoid the matrix inversion.An example of how the recursion could be transformed away is to specialize
f
for different arguments:Maybe there are other ways too.