[GHC] #14295: tagToEnum# leads to some silly closures
GHC
ghc-devs at haskell.org
Wed Sep 27 21:12:58 UTC 2017
#14295: tagToEnum# leads to some silly closures
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.4.1
Component: Compiler | Version: 8.2.1
Resolution: | Keywords: datacon-tags
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by dfeuer):
Specifically, any time CorePrep is tempted to produce
{{{#!hs
let x = tagToEnum# @KnownType y
in e
}}}
it should pause a moment and instead produce
{{{#!hs
case leWord# (int2Word# y) limit of
DEFAULT -> error "blah"
1# -> case tagToEnum# @KnownType y of x
DEFAULT -> e
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14295#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list