Commit 3f0dd74
committed
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.1 parent e4a778a commit 3f0dd74
1 file changed
+8
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | | - | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
| |||
0 commit comments