mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
![]() Abilities can only be defined on the toplevel of a module. There is a technical reason to this, which is that during type solving we must introduce all abilities at the very beginning, and we need to make sure ranks are correct. But there is a practical reason as well, which is that nested ability definitions don't seem to be very useful. Note that specializations can be nested, and are allowed to be. Also, we can revisit this in the future. I just don't want experiments to break right now because someone uses an ability in a nested scope where we don't expect. Closes #2878 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |