Disallow block parameters on extern forever
Previously there was an error message stating that block parameters are currently not supported, but they most probably never will be (@phischu)
We should also change the source and core representation. However, it would be good to do this after merging #1219
Note that there are specific use cases for external block parameters:
- https://github.com/effekt-lang/effekt/pull/1020/files#diff-95b6afb9b993424af9c118c39adf1b71ab6cc1f4dd061358b4a19659e450a99aR575 uses this for the
isJSNodeetc functions.
That is why I fixed the captures for them in https://github.com/effekt-lang/effekt/issues/448 . This does work on LLVM, because they are compiled away before reaching machine.
Otherwise, is there a reason they won't be supported? Apart from having to pass them through?
As in every extern fn, the llvm side would be required to handle the calling convention correctly in any case and it can just be a Neg, no?
We can also just support it, if you tell me what the semantics should be.
@phischu I would assume that the block parameters are also passed as parameters (of type %Neg probably?) and the foreign llvm code then would have to make sure to use them correctly (it is ffi after all).
That is, the llvm side is required to use the correct calling convention etc, as already is the case when passed a boxed function.
We might need to allow ${box b} in llvm, or allow ${b} for block variables b for this to be usable in LLVM (I have the latter stashed away somewhere, and think it is reasonable).