Open jon-edward opened 3 months ago
This seems to be an issue with opir, perhaps at https://github.com/PMunch/futhark/blob/783f2aff860f582ca7bc8d6f4801e13822a219c4/src/opir.nim#L322-L326
This needs to be passed a cursor https://github.com/PMunch/futhark/blob/8b5509892bdca65dd259ce450123cc9eaab8f7f5/src/opir.nim#L126-L127
Currently, futhark replaces argument names of function pointers with
a[some number]
.This can be seen with the simple example:
The result of
generated.nim
afternim r -d:nodeclguards ./test.nim
(no declaration guards for readability, the existence or nonexistence of this flag does not change the resulting type):It might be nicer for library usage if the resulting
generated.nim
was something more like:For users of the wrapper, it will offer more insight into what kind of objects should be passed to procs (more than just type information).