[GHC] #10946: Typed hole inside typed Template Haskell bracket causes panic
GHC
ghc-devs at haskell.org
Tue Feb 28 02:02:19 UTC 2017
#10946: Typed hole inside typed Template Haskell bracket causes panic
-------------------------------------+-------------------------------------
Reporter: jstolarek | Owner: (none)
Type: bug | Status: new
Priority: high | Milestone: 8.4.1
Component: Template Haskell | Version: 7.10.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash | Test Case: th/T10946
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by elliottt):
The problem seems to be that the quoted expression {{{[|| _x ||]}}} will
introduce a hole constraint of the form {{{ _x :: a }}} when spliced, but
that the error will be reported outside of the implication introduced by
the signature. When checking the following program:
{{{
m :: a
m = _x
}}}
{{{simplifyTop}}} will report that it's found an unsolved wanted
constraint of the form {{{ forall (a :: *). () => _x :: a }}}. However,
when checking the original program, {{{simplifyTop}}} is called from a
different path ({{{tcTopSpliceExpr}}}), and reports the wanted constraint
as being of the form {{{ _x :: a }}}. As it lacks the context of the
binding for {{{a}}}, it falls through to the base case of
{{{getSkolemInfo}}}, which causes the panic.
At this point, I'm not sure what the right path forward is. Should
{{{tcTopSpliceExpr}}} be using {{{simplifyTop}}}, or is there just some
additional context needed to be setup before that call?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10946#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list