panic tcMonoExpr _ with bad indentation in TH code
{-# 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 _
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.10.2 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |