
#14777: panic when using a function defined in terms of `error` -------------------------------------+------------------------------------- Reporter: zilinc | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Linux | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by monoidal): I think the current test case is still too fragile to be checked in. For example, given the lines: {{{ desugarTlv Include = __impossible "desugarTlv" desugarTlv IncludeStd = __impossible "desugarTlv" desugarTlv FunDef = __impossible "desugarTlv" desugarTlv DocBlock = __impossible "desugarTlv" }}} the panic appears only if all four string literals are the same and nonempty. Removing any of the four lines makes the panic disappear. Removing of identifiers that are nowhere used such as `TypeDec`, `freshVars`, `_varCtx` also stops the panic from happening. The error can also be reproduced with `-O -fliberate-case -fspec-constr` instead of `-O2` but I didn't manage to break down `-O` to individual options and keep the panic. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14777#comment:23 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler