[GHC] #12921: initTc: unsolved constraints

GHC ghc-devs at haskell.org
Thu Jan 12 01:33:04 UTC 2017


#12921: initTc: unsolved constraints
-------------------------------------+-------------------------------------
        Reporter:  jlp               |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  MacOS X           |         Architecture:  x86_64
 Type of failure:  Compile-time      |  (amd64)
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 I've trimmed the code down to just this:

 {{{#!hs
 {-# LANGUAGE OverloadedStrings #-}
 module LuaParser (stat) where

 data Parser a
 data Stat

 {-# ANN module "HLint: ignore Reduce duplication" #-}
 stat :: Parser Stat
 stat = choice []
 }}}

 This triggers this panic on GHC 8.0.2 and HEAD:

 {{{
 $ /opt/ghc/8.0.2/bin/ghci Bug.hs
 GHCi, version 8.0.2: http://www.haskell.org/ghc/  :? for help
 Loaded GHCi configuration from /home/rgscott/.ghci
 [1 of 1] Compiling LuaParser        ( Bug.hs, interpreted )
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.0.2 for x86_64-unknown-linux):
         initTc: unsolved constraints
   WC {wc_insol = [W] choice_a13R :: t_a13Q[tau:1] (CHoleCan: choice)}

 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 }}}

 But disturbingly, this panic does //not// occur on GHC 8.0.1, so this is a
 regression.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12921#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list