Changes to Typeable

Simon Peyton-Jones simonpj at microsoft.com
Mon Oct 8 15:37:28 CEST 2012


|  > I think it would be better to focus the discussion on the question of
|  > whether you would ever NOT want a type constructor to be an instance
|  > of Typeable
|  
|  Code size?  It might only be a small effect for most code, but we
|  occasionally see large files of automatically-generated data declarations.
|  
|  Also I rather like it that making a new data type is so cheap in terms
|  of code size.  A single module containing "data T = A | B":
|  
|  $ size foo.o
|      text    data     bss     dec     hex filename
|        91      32       0     123      7b foo.o
|  
|  If I add "deriving Typeable":
|  
|      text    data     bss     dec     hex filename
|       587     312       0     899     383 foo.o
|  7x larger!


I had a look at the code, and opened two new tickets, both of which are relatively easy to deal with, if anyone would like to volunteer
	http://hackage.haskell.org/trac/ghc/ticket/7307
	http://hackage.haskell.org/trac/ghc/ticket/7308

Simon




More information about the Libraries mailing list