Closed int-index closed 5 years ago
Polymorphic non-terminals and --coerce don't play well together. As it stands, this is accepted, effectively coercing Int to Bool:
--coerce
Int
Bool
a :: { Bool } : n { $1 } n :: { a } : { (0::Int) }
Besides the correctness issue, constraints don't work with --coerce either.
GHC cannot use --coerce because of this¹, suffering from a mild performance issue.
Please take a look at #134 which fixes the issue and adds a test case.
@simonmar, ping?
Polymorphic non-terminals and
--coerce
don't play well together. As it stands, this is accepted, effectively coercingInt
toBool
:Besides the correctness issue, constraints don't work with
--coerce
either.GHC cannot use
--coerce
because of this¹, suffering from a mild performance issue.Please take a look at #134 which fixes the issue and adds a test case.