[GHC] #10246: Literal Pattern match loses order

GHC ghc-devs at haskell.org
Mon Apr 6 08:33:31 UTC 2015


#10246: Literal Pattern match loses order
-------------------------------------+-------------------------------------
        Reporter:  nomeata           |                   Owner:  nomeata
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.10.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by nomeata):

 * owner:   => nomeata


Comment:

 Or maybe the problem is the part of the code that changes the patter
 {{{
   0x10000000000000000 -> "foo"
 }}}
 to
 {{{
   I# 0x10000000000000000# -> "foo"
 }}}
 which would be `tidyNPat` in `MatchLit.hs`. Unfortunately, that is far way
 from the nearest `dflags`.

 Maybe `hsLitKey :: DynFlags -> HsLit -> Literal` is a good spot for making
 sure the literal is in range... that seems to work.

 I’ll shortly open a DR with some questions to those in the know in these
 matters.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10246#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list