Data/Typeable/Uniplate instances for GHC types
marlowsd at gmail.com
Mon Jul 21 07:58:39 EDT 2008
Simon Peyton-Jones wrote:
> I wasn't suggesting changing GHC to *use* generic traversals. Rather, I was suggesting to initially use the simplest available technology to *provide* the possibility of generic operations to clients of the GHC API. They can choose whether or not to use them.
Ok! I'm sure that sooner or later we'd want to start using them inside GHC
too, though. I just want to make sure we keep an eye on those compile
> | -----Original Message-----
> | From: Chaddaï Fouché [mailto:chaddai.fouche at gmail.com]
> | Sent: 18 July 2008 15:44
> | To: Simon Marlow
> | Cc: Simon Peyton-Jones; cvs-ghc at haskell.org; Max Bolingbroke
> | Subject: Re: Data/Typeable/Uniplate instances for GHC types
> | 2008/7/18 Simon Marlow <marlowsd at gmail.com>:
> | > That approach worries me. We could add generic traversals all over the
> | > place, and while none of them is a "bottleneck", the overall effect could
> | be
> | > quite significant.
> | >
> | > The right approach I believe is to keep an eye on compile times when making
> | > these kind of changes, and if at any point the compiler slows down by a few
> | > percent, then back off. Timing a compile of GHC itself is good for this.
> | >
> | I recently added Data and Typeable instance to all AST datatypes
> | directly in the code of GHC, the compilation time didn't seem affected
> | by this addition. Of course I didn't try to add Uniplate, Term ...
> | instances as well.
> | --
> | Jedaï
More information about the Cvs-ghc