[GHC] #13585: ala from Control.Lens.Wrapped panics

GHC ghc-devs at haskell.org
Tue Apr 18 22:05:13 UTC 2017


#13585: ala from Control.Lens.Wrapped panics
-------------------------------------+-------------------------------------
        Reporter:  fumieval          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:
       Component:  Compiler (Type    |              Version:
  checker)                           |
      Resolution:                    |             Keywords:  TypeInType
Operating System:  Linux             |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by simonpj):

 * keywords:   => TypeInType
 * priority:  normal => highest
 * cc: goldfire (added)


Comment:

 Thank you pacak!

 Core Lint fails when compiling `Panic.hs` with
 {{{
     Data alternative when scrutinee is not a tycon application
     Scrutinee type: (Exchange (Unwrapped (First ()))
                               (Unwrapped (First ()))
                        |> <*->*->*>_N)
                        (Maybe ())
                        ((Identity |> <*->*>_N)
                        (Maybe ()))
     Alternative: Exchange sa_a36Y bt_a36Z ->
                    Exchange
                      @ (Unwrapped (First ()))
                      @ (Unwrapped (First ()))
                      @ (First ())
                      @ (Identity (First ()))
                      (\ (x_a377 :: First ()) -> sa_a36Y (x_a377 `cast`
 <Co:2>))
                      ((\ (x_a377 :: Unwrapped (First ())) -> bt_a36Z
 x_a377)
                       `cast` <Co:36>)
 }}}


 Richard, this is a live example of where `splitTyConApp` (in
 `CoreLint.lintCoreAlt`) fails on a type that looks like
 {{{
   (Exchange t1 t2 |> Refl) t3 t4
 }}}
 The `Refl` is getting in the way of the `splitTyConApp`.

 I think we agreed to make it an invariant that no such `Refl` casts will
 exist in types.  How are you getting on with making it so?

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


More information about the ghc-tickets mailing list