[GHC] #9999: Typeable deriving behavior different between data families and associated data types

#9999: Typeable deriving behavior different between data families and associated data types -------------------------------------+------------------------------------- Reporter: shachaf | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.4 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- With `AutoDeriveTypeable`, data families get a `Typeable` instance, but associated data types in a class don't (and even standalone deriving doesn't work for them). {{{ λ> data family Foo a λ> typeRep (Proxy :: Proxy Foo) Foo λ> class K a where { data Bar a } λ> typeRep (Proxy :: Proxy Bar) <interactive>:6:1: No instance for (Typeable Bar) arising from a use of ‘typeRep’ In the expression: typeRep (Proxy :: Proxy Bar) In an equation for ‘it’: it = typeRep (Proxy :: Proxy Bar) λ> deriving instance Typeable Bar <interactive>:7:1: Can't make a derived instance of ‘Typeable Bar’: Deriving Typeable is not allowed for family instances; derive Typeable for ‘Bar’ alone In the stand-alone deriving instance for ‘Typeable Bar’ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9999 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9999: Typeable deriving behavior different between data families and associated data types -------------------------------------+------------------------------------- Reporter: shachaf | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.4 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by simonpj): * cc: dreixel (added) Comment: Pedro, any comments? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9999#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9999: Typeable deriving behavior different between data families and associated data types -------------------------------------+------------------------------------- Reporter: shachaf | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.4 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by dreixel): With HEAD, the standalone deriving clause works. But `AutoDeriveTypeable` is indeed not working as it should here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9999#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9999: Typeable deriving behavior different between data families and associated data types -------------------------------------+------------------------------------- Reporter: shachaf | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.4 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by simonpj): Aha. Might you feel able to fix it? Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9999#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9999: Typeable deriving behavior different between data families and associated data types -------------------------------------+------------------------------------- Reporter: shachaf | Owner: dreixel Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.4 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by dreixel): * owner: => dreixel -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9999#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9999: Typeable deriving behavior different between data families and associated
data types
-------------------------------------+-------------------------------------
Reporter: shachaf | Owner: dreixel
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.4
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by Jose Pedro Magalhaes

#9999: Typeable deriving behavior different between data families and associated data types -------------------------------------+------------------------------------- Reporter: shachaf | Owner: dreixel Type: bug | Status: merge Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.4 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: new => merge * milestone: => 7.10.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9999#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9999: Typeable deriving behavior different between data families and associated data types -------------------------------------+------------------------------------- Reporter: shachaf | Owner: dreixel Type: bug | Status: closed Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.8.4 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed Comment: Merged to `ghc-7.10`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9999#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9999: Typeable deriving behavior different between data families and associated
data types
-------------------------------------+-------------------------------------
Reporter: shachaf | Owner: dreixel
Type: bug | Status: closed
Priority: normal | Milestone: 7.10.1
Component: Compiler | Version: 7.8.4
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones
participants (1)
-
GHC