You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
annotate comparison subexpressions in AlexTemplate
GTE() and EQ() were getting the following errors for the
monadUserState-strict-text and possibly other cases with
-XImpredicativeTypes enabled:
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))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Annotating the tagToEnum# usage to specify which Enum is intended was
one case. Another was annotating the results of ==# and >=# to resolve
some ambiguity involved there.
0 commit comments