Visitar URL original
-XImpredicativeTypes incompatibility · Issue #277 · haskell/alex · GitHub
Skip to content

-XImpredicativeTypes incompatibility #277

Closed

Description

@NadiaYvette

With -XImpredicativeTypes the following error occurs:

basic_typeclass.i.hs:877:28: error: [GHC-36495]
• tagToEnum# must appear applied to one value argument
• In the first argument of ‘(&&)’, namely
‘(GHC.Exts.tagToEnum# (offset >=# 0#))’
In the expression:
(GHC.Exts.tagToEnum# (offset >=# 0#))
&&
let check = alexIndexInt16OffAddr alex_check offset
in (GHC.Exts.tagToEnum# (check ==# ord_c))
In the expression:
if (GHC.Exts.tagToEnum# (offset >=# 0#))
&&
let check = alexIndexInt16OffAddr alex_check offset
in (GHC.Exts.tagToEnum# (check ==# ord_c)) then
alexIndexInt16OffAddr alex_table offset
else
alexIndexInt16OffAddr alex_deflt s
|
877 | new_s = if GTE(offset,ILIT(0))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The branch https://github.com/NadiaYvette/alex/tree/nadia.chambers/tagToEnum-annotations-001 adds testcases by adding %.i$(HS_PROG_EXT) to the set of testcases and a fix by adding annotations within the C macros.

Activity

  1. added theissue type on Aug 3, 2025
  2. added this to the 3.5.4.0 milestone on Aug 3, 2025
  3. andreasabel commented on Aug 3, 2025

    @andreasabel
    Member

    Thanks for the report and the PR!

  4. added a commit that references this issue on May 11, 2026
  5. added a commit that references this issue on May 14, 2026
  6. added a commit that references this issue on Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions