[jhc] Optimization.

Isaac Dupree isaacdupree at charter.net
Fri Feb 15 19:23:25 EST 2008

John Meacham wrote:
> Actually what I really need to do to make issues like that maybe thing
> from coming up is allow derived instances to happen at a place other
> than where the type is delared. pulling in 'Read' to declare Bool just
> doesn't work that well. and I don't like all these manually written
> instances cluttering up the libraries..
> perhaps a pragma.. like {-# DERIVE: Enum Bool #-}. or putting "deriving
> 'Read'" will just add a placeholder that will be expanded to a real
> derivation when the read class comes into scope. though, that is sort of
> hacky as I would have to fudge namespace resolution in deriving clauses.

now that GHC has "standalone deriving" syntax, standalone deriving might 
be something to start from

> do other compilers do something clever here? it looks like ghc does what
> I do but with CPP tricks and basically writes out its own instances in
> full.
>         John

More information about the jhc mailing list