2008/10/14 Thomas Schilling <[EMAIL PROTECTED]>: > So, I've been thinking. How do plugins get used by GHC? Maybe it's > possible to have a ghc-plugin-api package that exports binary and ghc. > IIUC, the plugin need not be part of the compiled program, so we > could expose binary only to the plugins. This way at least only > plugin-writers would be bound to GHC's version of binary.
One key point that perhaps I haven't expressed very clearly is that there were basically three seperate concerns in my SoC work: 1) A phase system that allows both controlling when rules AND plugin-installed Core passes fire 2) An annotations system that is useful both for marking functions with information interesting to plugins AND for other things (e.g. marking functions that implement tests so they can be spotted by e.g. an external QuickCheck runner) 3) A plugins system that depends on 1) and 2) So the annotations system is really a piece of the puzzle that is quite seperate from the plugins system (indeed, I intend to submit a patch that adds it to GHC HEAD without going near any of the plugins stuff as soon as we resolve this dependency issue). That being said, I don't think it's possible to tease any dependency on Binary away from GHC itself. The problem is that during typechecking of the annotation I really need to be able to serialize the thing for the interface file by grabbing a Binary instance and running one of its methods. I believe that is going to tie us to a particular binary version no matter what we do... Cheers, Max _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
