[jhc] Optimization.

John Meacham john at repetae.net
Fri Feb 15 18:15:17 EST 2008


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.

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


-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the jhc mailing list