
#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 phadej): This happens because some "grammar" checks happen after the parsing phase: This fails with parse error: {{{ foo = \x -> case x of "foo" -> "bar" _ -> x {- bar.hs:32:21: parse error on input ‘->’ -} }}} But this, which is triggered in TH slice, is something different: {{{ foo = (\x -> case x of "foo" -> "bar" _ -> x) {- bar.hs:20:8: Pattern syntax in expression context: \ x -> case x of { "foo" -> "bar" (...) } -> x -} }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11184#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler