
#8318: GHC does not infer type of `tagToEnum#` expression
-------------------------------------+-------------------------------------
Reporter: jstolarek | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.7
(Type checker) | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Unknown
Unknown/Multiple | Blocked By:
Type of failure: GHC | Related Tickets:
rejects valid program |
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Changes (by thomie):
* component: Compiler => Compiler (Type checker)
Comment:
The error message for the code from the description is improved using ghc
HEAD. A regression test should be added.
{{{
$ ghc-7.9.20141115 test.hs
[1 of 1] Compiling TTE ( test.hs, test.o )
test.hs:6:10:
Bad call to tagToEnum# at type r_alE
Specify the type by giving a type signature
e.g. (tagToEnum# x) :: Bool
In the expression: tagToEnum# 1#
In the expression:
case tagToEnum# 1# of {
True -> "True"
False -> "False" }
In an equation for âfâ:
f = case tagToEnum# 1# of {
True -> "True"
False -> "False" }
}}}
See also commit 706c439fb5d3f1e30ad7b3953fde17dd01dae1bc:
{{{
Author: simonpj