[GHC] #16348: GHC HEAD regression: tyConAppArgs

#16348: GHC HEAD regression: tyConAppArgs -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.7 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Compile-time Unknown/Multiple | crash or panic Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- The following program compiles (with `-O`) on GHC 7.0.4 through 8.6.3, but panics on HEAD: {{{#!hs {-# LANGUAGE DeriveFunctor #-} module Bug where data V2 a = V2 !a !a deriving Functor (*^) :: (Functor f, Num a) => a -> f a -> f a (*^) a = fmap (a*) (*!!) :: (Functor m, Functor r, Num a) => a -> m (r a) -> m (r a) s *!! m = fmap (s *^) m type M22 a = V2 (V2 a) det22 :: Num a => M22 a -> a det22 (V2 (V2 a b) (V2 c d)) = a * d - b * c inv22 :: Fractional a => M22 a -> M22 a inv22 m@(V2 (V2 a b) (V2 c d)) = (1 / det) *!! V2 (V2 d (-b)) (V2 (-c) a) where det = det22 m }}} {{{ $ ~/Software/ghc4/inplace/bin/ghc-stage2 -fforce-recomp Bug.hs -O [1 of 1] Compiling Bug ( Bug.hs, Bug.o ) ghc-stage2: panic! (the 'impossible' happened) (GHC version 8.7.20190219 for x86_64-unknown-linux): tyConAppArgs a_a1FK Call stack: CallStack (from HasCallStack): callStackDoc, called at compiler/utils/Outputable.hs:1159:37 in ghc:Outputable pprPanic, called at compiler/types/Type.hs:1183:50 in ghc:Type }}} Note that this panic does not occur if `V2` is defined without `!`s. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16348 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16348: GHC HEAD regression: tyConAppArgs -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: Component: Compiler | Version: 8.7 Resolution: | Keywords: Operating System: Unknown/Multiple | 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 RyanGlScott): * priority: normal => highest -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16348#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16348: GHC HEAD regression: tyConAppArgs -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: Component: Compiler | Version: 8.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by monoidal): This was introduced by my commit 7833cf407d1f6 (Look through newtype wrappers). I don't know what's going on yet. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16348#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16348: GHC HEAD regression: tyConAppArgs -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: Component: Compiler | Version: 8.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Ah. I see what is happening. Fix en route. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16348#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16348: GHC HEAD regression: tyConAppArgs -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: highest | Milestone: Component: Compiler | Version: 8.7 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Compile-time | Test Case: crash or panic | simplCore/should_compile/T16348 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/416 -------------------------------------+------------------------------------- Changes (by RyanGlScott): * testcase: => simplCore/should_compile/T16348 * differential: => https://gitlab.haskell.org/ghc/ghc/merge_requests/416 Comment: simonpj, what is the status of this ticket post-[https://gitlab.haskell.org/ghc/ghc/commit/c25b135ff5b9c69a90df0ccf51b04952c2... c25b135ff5b9c69a90df0ccf51b04952c2dc6ee1]? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16348#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16348: GHC HEAD regression: tyConAppArgs -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: closed Priority: highest | Milestone: Component: Compiler | Version: 8.7 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Compile-time | Test Case: crash or panic | simplCore/should_compile/T16348 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/416 -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16348#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16348: GHC HEAD regression: tyConAppArgs -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: closed Priority: highest | Milestone: 8.10.1 Component: Compiler | Version: 8.7 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: Compile-time | Test Case: crash or panic | simplCore/should_compile/T16348 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/416 -------------------------------------+------------------------------------- Changes (by RyanGlScott): * milestone: => 8.10.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16348#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#16348: GHC HEAD regression: tyConAppArgs
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: closed
Priority: highest | Milestone: 8.10.1
Component: Compiler | Version: 8.7
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Compile-time | Test Case:
crash or panic | simplCore/should_compile/T16348
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: | https://gitlab.haskell.org/ghc/ghc/merge_requests/416
-------------------------------------+-------------------------------------
Comment (by Matthew Pickering
participants (1)
-
GHC