[GHC] #13775: Type family expansion is too lazy, allows accepting of ill-typed terms

GHC ghc-devs at haskell.org
Thu Jun 1 13:40:22 UTC 2017


#13775: Type family expansion is too lazy, allows accepting of ill-typed terms
-------------------------------------+-------------------------------------
        Reporter:  fizruk            |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.2
  checker)                           |             Keywords:
      Resolution:                    |  CustomTypeErrors
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  GHC accepts       |  Unknown/Multiple
  invalid program                    |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by fizruk):

 By the way, if you mistype `Proxy` as `Prox`, you can also get GHC panic:

 {{{
 >>> Prox @ (Head '[])
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.0.2 for x86_64-apple-darwin):
         initTc: unsolved constraints
   WC {wc_insol =
         [W] Prox_a1L4 :: t_a1L3[tau:1] (CHoleCan: Prox)
         [W] Prox_a1Ls :: t_a1Lr[tau:1] (CHoleCan: Prox)}

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

 But this panic seems to be because of `TypeApplications` and can be
 reproduced with just two lines in GHCi:

 {{{
 >>> :set -XTypeApplications
 >>> X @ Int
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.0.2 for x86_64-apple-darwin):
         initTc: unsolved constraints
   WC {wc_insol =
         [W] X_a13x :: t_a13w[tau:1] (CHoleCan: X)
         [W] X_a13V :: t_a13U[tau:1] (CHoleCan: X)}

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

 Should I file this one separately?

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


More information about the ghc-tickets mailing list