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

GHC ghc-devs at haskell.org
Tue Apr 18 07:23:38 UTC 2017


#13585: ala from Control.Lens.Wrapped panics
-------------------------------------+-------------------------------------
           Reporter:  fumieval       |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:
  (Type checker)                     |
           Keywords:                 |  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:
-------------------------------------+-------------------------------------
 Panic.hs:

 {{{
 module Panic where

 import Control.Lens.Wrapped
 import Data.Monoid

 foo :: Maybe String
 foo = ala Last foldMap [Just "foo"]
 }}}

 main.hs:
 {{{
 module Main where
 import Panic (foo)

 main :: IO ()
 main = print foo
 }}}

 {{{
 $ ghc -c -O2 Panic.hs
 $ ghc -c -O2 main.hs
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.2.0.20170404 for x86_64-unknown-linux):
         splitTyConApp
   (Exchange (Unwrapped (Last String)) (Unwrapped (Last String)) |> <*
                                                                     -> *
 -> *>_N) (Maybe
 [Char]) ((Identity |> <*
 -> *>_N) (Maybe
 [Char]))
   Call stack:
       CallStack (from HasCallStack):
         prettyCurrentCallStack, called at
 compiler/utils/Outputable.hs:1134:58 in ghc:Outputable
         callStackDoc, called at compiler/utils/Outputable.hs:1138:37 in
 ghc:Outputable
         pprPanic, called at compiler/types/Type.hs:1105:34 in ghc:Type

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

 The GHC version is 8134f7d4ba2c14b2f24d2f4c1f5260fcaff3304a.

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


More information about the ghc-tickets mailing list