[GHC] #9842: No Typeable instance for type-level literals

#9842: No Typeable instance for type-level literals -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- There's no Typeable instance for string and numeric literals. E.g. {{{ Prelude GHC.TypeLits Data.Typeable> typeRep (Proxy :: Proxy "foo") <interactive>:15:1: No instance for (Typeable "foo") arising from a use of ‘typeRep’ In the expression: typeRep (Proxy :: Proxy "foo") In an equation for ‘it’: it = typeRep (Proxy :: Proxy "foo") }}} This means that we can't have a Typeable instance for phantom types parameterised by these literals. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9842 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9842: No Typeable instance for type-level literals
-------------------------------------+-------------------------------------
Reporter: Feuerbach | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.3
Resolution: duplicate | Keywords:
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Unknown
Type of failure: | Blocked By:
None/Unknown | Related Tickets: #8778
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Changes (by thomie):
* status: new => closed
* resolution: => duplicate
* related: => #8778
Comment:
In commit 0354fb3676e5b0044601c8e0a5f8039f0cac0c8d:
{{{
Author: Iavor S. Diatchki

#9842: No Typeable instance for type-level literals and promoted types -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: duplicate | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: #8778 Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Description changed by Feuerbach: Old description:
There's no Typeable instance for string and numeric literals. E.g.
{{{ Prelude GHC.TypeLits Data.Typeable> typeRep (Proxy :: Proxy "foo")
<interactive>:15:1: No instance for (Typeable "foo") arising from a use of ‘typeRep’ In the expression: typeRep (Proxy :: Proxy "foo") In an equation for ‘it’: it = typeRep (Proxy :: Proxy "foo") }}}
This means that we can't have a Typeable instance for phantom types parameterised by these literals.
New description: There's no Typeable instance for string and numeric literals. E.g. {{{ Prelude GHC.TypeLits Data.Typeable> typeRep (Proxy :: Proxy "foo") <interactive>:15:1: No instance for (Typeable "foo") arising from a use of ‘typeRep’ In the expression: typeRep (Proxy :: Proxy "foo") In an equation for ‘it’: it = typeRep (Proxy :: Proxy "foo") }}} This means that we can't have a Typeable instance for phantom types parameterised by these literals. Ditto for the promoted data types: {{{ Prelude Data.Typeable> typeRep (Proxy :: Proxy Nothing) <interactive>:4:1: No instance for (Typeable 'Nothing) arising from a use of ‘typeRep’ In the expression: typeRep (Proxy :: Proxy Nothing) In an equation for ‘it’: it = typeRep (Proxy :: Proxy Nothing) }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9842#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9842: No Typeable instance for type-level literals and promoted types -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: duplicate | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: #8778 Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by Feuerbach): Thanks thomie. Is the second part fixed as well? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9842#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9842: No Typeable instance for type-level literals and promoted types -------------------------------------+------------------------------------- Reporter: Feuerbach | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.8.3 Resolution: duplicate | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: #8778 Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by thomie): Yes, it will be in 7.10: {{{ Prelude Data.Typeable> typeRep (Proxy :: Proxy Nothing) Nothing }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9842#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC