Idris2 icon indicating copy to clipboard operation
Idris2 copied to clipboard

[ fix ] Remove type constructor tags

Open spcfox opened this issue 6 months ago • 1 comments

Description

Currently, the type constructor tag is always 100. In fact, they are not used. Therefore, I propose to remove them and also fix several related bugs.

Commits:

  1. Fixed a bug that prevented the tag counter from increasing
  2. Fixed irrefutable pattern with type in index
  3. Fixed checking for emptiness of type with type in index. This is the only place where type constructors are compared by tags. But they are unique only within the module. Therefore, type constructors should be compared by name, as in all other places.
  4. Type constructor tags have been removed because they are not suitable for comparison and are no longer used.
  5. Remove some boilerplate.

Should this change go in the CHANGELOG?

  • [ ] If this is a fix, user-facing change, a compiler change, or a new paper implementation, I have updated CHANGELOG_NEXT.md (and potentially also CONTRIBUTORS.md).

spcfox avatar Jun 10 '25 11:06 spcfox

Also, tags removed in Yaffle https://github.com/edwinb/Yaffle/commit/f26c9a0e8463e04730bf1af63410e9c6ff8290e3#diff-ba25068d28a398c3bade02a547922670d11ca8845d0e54a9ed9b180e9d76b702

spcfox avatar Jun 10 '25 12:06 spcfox

I just noticed the failing test but I'm not on The computer. I'll look into this later

andrevidela avatar Aug 12 '25 17:08 andrevidela

Ah right the fix is already availabe on the LSP side cool let's do it

andrevidela avatar Aug 12 '25 17:08 andrevidela