[GHC] #11184: panic tcMonoExpr _ with bad indentation in TH code

GHC ghc-devs at haskell.org
Wed Dec 9 11:19:36 UTC 2015


#11184: panic tcMonoExpr _ with bad indentation in TH code
-------------------------------------+-------------------------------------
           Reporter:  TeroLaitinen   |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  7.10.2
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Runtime crash
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 {{{#!hs
 {-# LANGUAGE TemplateHaskell #-}
 import Data.Aeson.TH
 data Record = Record {
     type_ :: Int
 }

 $(deriveJSON defaultOptions{
     fieldLabelModifier = \x -> case x of
         "type_" -> "type"
             _ -> x
 } ''Record)
 }}}

 gives

 {{{
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.10.2 for x86_64-unknown-linux):
         tcMonoExpr _
 }}}

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


More information about the ghc-tickets mailing list