
On 21 January 2011 23:59, austin seipp
Perhaps Max can elaborate on why this design was rejected in favor of the current one, so we can see how and where it falls down, and what we really want.
The only reason really is that it added a lot of mechanism. From the top of my head: * Parsing etc for PHASE pragmas that declared phase objects * A new namespace for phases * Stuff to gather declared phases from all imported modules during compilation * A built-in phase for each core pass * A solver that ordered core passes and plugin passes according to the phases So it was a lot of trouble for relatively little gain. In an effort to keep the delta against GHC small I threw it out in favour of the much, much simpler design we have today.
Thomas pointed out the Scala compiler plugin design document, so I'll be sure to read over it this weekend when I get the chance to cook up ideas.
The Scala plugins project was just starting when I was working on GHC plugins so there was no design doc I could refer to at that time. Shame :-( Thanks for taking the lead on resurrecting plugins, Austin! Cheers, Max