Extraction of top-level function alias
Consider the following example:
use mach.int.Int63 let f (x y: int63) = x + y let g = f let a = g 42 0
Extracting this program results in the following ill-typed OCaml code:
let f (x y: int) : int = x + y let a = g 42 0
This problem happens because in
compile.ml we are simply ignoring
PDlet (LDsym (_, cty)) nodes where
cty.c_node is not a
Cfun. For the above example,
c_node = Capp _.
I thought we could not define any kind of partial application at top-level at all, but it seems that function aliasing is allowed. @paskevyc is it true that we can only have a
c_node = Capp _ at top-level if it is a function aliasing, such as the above
let g = f? It that is the case, should this be compiled as a partial application, using @rrieuhel !364 (merged) merge request?