[GHC] #11643: Core lint error in simplifier when compiling Rules1 with -O -prof -dcore-lint

#11643: Core lint error in simplifier when compiling Rules1 with -O -prof -dcore- lint -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler | Version: 8.0.1-rc2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Running `make TEST=Rules1 WAY=profasm` results in a core lint error (see attachment) with ghc-8.0.1-rc2. This is the code: {{{#!hs {-# LANGUAGE TypeFamilies #-} module Rules1 where class C a where data T a instance (C a, C b) => C (a,b) where data T (a,b) = TPair (T a) (T b) mapT :: (C a, C b) => (a -> b) -> T a -> T b {-# NOINLINE mapT #-} -- Otherwwise we get a warning from the rule mapT = undefined zipT :: (C a, C b) => T a -> T b -> T (a,b) {-# NOINLINE [1] zipT #-} zipT = undefined {-# RULES "zipT/mapT" forall f x y. zipT (mapT f x) y = mapT (\(x,y) -> (f x, y)) (zipT x y) #-} }}} {{{ $ ghc-8.0.1 -O -prof Rules1.hs -dcore-lint }}} This is a regression from 7.10.3, and core lint errors are bad, so setting priority to highest. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11643 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11643: Core lint error in simplifier when compiling Rules1 with -O -prof -dcore- lint -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler | Version: 8.0.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * Attachment "T11643.log" added. Core lint error -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11643 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11643: Core lint error in simplifier when compiling Rules1 with -O -prof -dcore- lint -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler | Version: 8.0.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: indexed- | types/should_compile/Rules1 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * testcase: => indexed-types/should_compile/Rules1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11643#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11643: Core lint error in simplifier when compiling Rules1 with -O -dcore-lint -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler | Version: 8.0.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: indexed- | types/should_compile/Rules1 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- @@ -1,1 +1,1 @@ - Running `make TEST=Rules1 WAY=profasm` results in a core lint error (see + Running `make TEST=Rules1 WAY=optasm` results in a core lint error (see @@ -33,1 +33,1 @@ - $ ghc-8.0.1 -O -prof Rules1.hs -dcore-lint + $ ghc-8.0.1 -O Rules1.hs -dcore-lint New description: Running `make TEST=Rules1 WAY=optasm` results in a core lint error (see attachment) with ghc-8.0.1-rc2. This is the code: {{{#!hs {-# LANGUAGE TypeFamilies #-} module Rules1 where class C a where data T a instance (C a, C b) => C (a,b) where data T (a,b) = TPair (T a) (T b) mapT :: (C a, C b) => (a -> b) -> T a -> T b {-# NOINLINE mapT #-} -- Otherwwise we get a warning from the rule mapT = undefined zipT :: (C a, C b) => T a -> T b -> T (a,b) {-# NOINLINE [1] zipT #-} zipT = undefined {-# RULES "zipT/mapT" forall f x y. zipT (mapT f x) y = mapT (\(x,y) -> (f x, y)) (zipT x y) #-} }}} {{{ $ ghc-8.0.1 -O Rules1.hs -dcore-lint }}} This is a regression from 7.10.3, and core lint errors are bad, so setting priority to highest. -- Comment (by thomie): Update: also without `-prof`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11643#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11643: Core lint error in simplifier when compiling Rules1 with -O -dcore-lint
-------------------------------------+-------------------------------------
Reporter: thomie | Owner:
Type: bug | Status: new
Priority: highest | Milestone: 8.0.1
Component: Compiler | Version: 8.0.1-rc2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case: indexed-
| types/should_compile/Rules1
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Thomas Miedema

#11643: Core lint error in simplifier when compiling Rules1 with -O -dcore-lint
-------------------------------------+-------------------------------------
Reporter: thomie | Owner:
Type: bug | Status: new
Priority: highest | Milestone: 8.0.1
Component: Compiler | Version: 8.0.1-rc2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case: indexed-
| types/should_compile/Rules1
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#11643: Core lint error in simplifier when compiling Rules1 with -O -dcore-lint -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler | Version: 8.0.1-rc2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: indexed- | types/should_compile/Rules1 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): I think this is fixed. Can someone check and un-mark those tests? Thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11643#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11643: Core lint error in simplifier when compiling Rules1 with -O -dcore-lint
-------------------------------------+-------------------------------------
Reporter: thomie | Owner:
Type: bug | Status: new
Priority: highest | Milestone: 8.0.1
Component: Compiler | Version: 8.0.1-rc2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case: indexed-
| types/should_compile/Rules1
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#11643: Core lint error in simplifier when compiling Rules1 with -O -dcore-lint -------------------------------------+------------------------------------- Reporter: thomie | Owner: Type: bug | Status: closed Priority: highest | Milestone: 8.0.1 Component: Compiler | Version: 8.0.1-rc2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: indexed- | types/should_compile/Rules1 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed Comment: Indeed these are fixed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11643#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC