#3480: Easily make Typeable keys  pure, so that Typeable can be handled
efficiently across communications
-----------------------------+----------------------------------------------
  Reporter:  guest           |          Owner:                      
      Type:  task            |         Status:  new                 
  Priority:  normal          |      Milestone:  7.2.1               
 Component:  libraries/base  |        Version:                      
Resolution:                  |       Keywords:  Typeable, efficiency
  Testcase:                  |      Blockedby:                      
Difficulty:  Unknown         |             Os:  Unknown/Multiple    
  Blocking:                  |   Architecture:  Unknown/Multiple    
   Failure:  None/Unknown    |  
-----------------------------+----------------------------------------------
Changes (by lealanko):

 * cc: la@… (added)
  * status:  closed => new
  * resolution:  fixed =>


Comment:

 Unfortunately the new {{{TypeRepKey}}} type is abstract and provides no
 operations apart from {{{Eq}}} and {{{Ord}}} instances. Hence, there is
 still no way to write a type representation into a file or across the
 wire. Jush {{{show}}}ing a {{{TypeRep}}} won't cut it, since that loses
 the distinctions between similarly named types in different modules.

 So, I think we need a {{{Show}}} instance for {{{TypeRepKey}}}, or better
 yet, a {{{Binary}}} instance. Moreover, a non-deprecated pure function
 {{{TypeRep -> TypeRepKey}}} is in place, since the keys have an actual use
 as a compact, efficient, and serializable injection of the typereps.

 Alternatively, the {{{Show}}} instance of {{{TypeRep}}} could be made
 injective by printing out the package and module.

 (I intended to open a new ticket, I hope it's ok that I reopen this old
 one instead.)

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3480#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to