[GHC] #11184: panic tcMonoExpr _ with bad indentation in TH code
GHC
ghc-devs at haskell.org
Fri Mar 25 05:54:18 UTC 2016
#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
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Runtime crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by mgsloan):
Perhaps this is worth another bug report, but here's another case:
{{{
{-# LANGUAGE TemplateHaskell #-}
-- A realistic example, demonstrating how this can be baffling in real
code.
$(mapM (n -> [d| foo = n |]) [1])
-- Minimal example
$((x -> x))
}}}
causes
{{{
ghc: panic! (the 'impossible' happened)
(GHC version 7.10.3 for x86_64-unknown-linux):
tcMonoExpr _
}}}
Similarly, this is likely due to expressions and patterns sharing parsing.
We just need to do the same checks that are applied to normal user code.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11184#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list