[GHC] #11246: Regression typechecking type synonym which includes `Any`.
#11246: Regression typechecking type synonym which includes `Any`. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 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: -------------------------------------+------------------------------------- {{{ module Foo where import GHC.Exts type Key a = Any }}} produces the error message on HEAD but compiles on 7.8.3 and 7.10.1 (thanks to Reid for testing). {{{unsafeany.hs:5:1: error: • The type family ‘Any’ should have no arguments, but has been given none • In the type synonym declaration for ‘Key’ Failed, modules loaded: none. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11246> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11246: Regression typechecking type synonym which includes `Any`. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 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: | -------------------------------------+------------------------------------- Old description:
{{{ module Foo where
import GHC.Exts
type Key a = Any }}}
produces the error message on HEAD but compiles on 7.8.3 and 7.10.1 (thanks to Reid for testing).
{{{unsafeany.hs:5:1: error: • The type family ‘Any’ should have no arguments, but has been given none • In the type synonym declaration for ‘Key’ Failed, modules loaded: none. }}}
New description: {{{ module Foo where import GHC.Exts type Key a = Any }}} produces the error message on HEAD but compiles on 7.8.3 and 7.10.1 (thanks to Reid for testing). {{{ unsafeany.hs:5:1: error: • The type family ‘Any’ should have no arguments, but has been given none • In the type synonym declaration for ‘Key’ Failed, modules loaded: none. }}} -- Comment (by mpickering): Omer comments that the bug could be caused by levity polymorphism.
mpickering: I don't quite understand what changes need to be made, but if you look at anyTyCon in TysPrim.hs you'll see that it's not updated after Richard's patch. I'm just guessing that this may be the reason because tuple tycons are changed to update the kind arguments, for example.
-- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11246#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11246: Regression typechecking type synonym which includes `Any`. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: goldfire Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 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 goldfire): * owner: => goldfire Comment: I doubt it's levity polymorphism, but I feel quite confident I'm the culprit. Will look into this. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11246#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11246: Regression typechecking type synonym which includes `Any`. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: goldfire Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.11 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 hvr): * priority: normal => high * version: 7.10.3 => 7.11 * milestone: => 8.0.1 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11246#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11246: Regression typechecking type synonym which includes `Any`. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: goldfire Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: TypeInType 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 simonpj): * keywords: => TypeInType -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11246#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11246: Regression typechecking type synonym which includes `Any`. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: goldfire Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.11 Resolution: | Keywords: TypeInType 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 asr): * cc: asr (added) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11246#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11246: Regression typechecking type synonym which includes `Any`. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: goldfire Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 8.0.1-rc2 Resolution: | Keywords: TypeInType 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 asr): * version: 7.11 => 8.0.1-rc2 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11246#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11246: Regression typechecking type synonym which includes `Any`. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: goldfire Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler | Version: 8.0.1-rc2 Resolution: | Keywords: TypeInType 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 asr): * priority: high => highest Comment: This issue will block hashtables for supporting GHC 8.0.1 (and hashtables will block Agda). -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11246#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11246: Regression typechecking type synonym which includes `Any`. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: goldfire Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc2 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * failure: None/Unknown => GHC rejects valid program * component: Compiler => Compiler (Type checker) @@ -1,1 +1,1 @@ - {{{ + {{{#!hs New description: {{{#!hs module Foo where import GHC.Exts type Key a = Any }}} produces the error message on HEAD but compiles on 7.8.3 and 7.10.1 (thanks to Reid for testing). {{{ unsafeany.hs:5:1: error: • The type family ‘Any’ should have no arguments, but has been given none • In the type synonym declaration for ‘Key’ Failed, modules loaded: none. }}} -- -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11246#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11246: Regression typechecking type synonym which includes `Any`. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: goldfire Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc2 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by Richard Eisenberg <eir@…>): In [changeset:"489e6ab5990f0f37624f14d6bf3f0025476513a1/ghc" 489e6ab5/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="489e6ab5990f0f37624f14d6bf3f0025476513a1" Fix #11246. We have to instantiate any invisible arguments to type families right away. This is now done in tcTyCon in TcHsType. testcase: typecheck/should_compile/T11246 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11246#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11246: Regression typechecking type synonym which includes `Any`. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: goldfire Type: bug | Status: merge Priority: highest | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc2 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: GHC rejects | Test Case: valid program | typecheck/should_compile/T11246 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by goldfire): * status: new => merge * testcase: => typecheck/should_compile/T11246 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11246#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11246: Regression typechecking type synonym which includes `Any`. -------------------------------------+------------------------------------- Reporter: mpickering | Owner: goldfire Type: bug | Status: closed Priority: highest | Milestone: 8.0.1 Component: Compiler (Type | Version: 8.0.1-rc2 checker) | Resolution: fixed | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: GHC rejects | Test Case: valid program | typecheck/should_compile/T11246 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged to `ghc-8.0` as 6133d58121ce80d3b481eaee2a008c6086aa2f0d. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11246#comment:11> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC