id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,testcase,blockedby,blocking,related,differential
5941,Add compilation stage plugins,tibbe,,"There are several different tools that could be written using one of GHC's intermediate ASTs, like the post type-checking `HsSyn Id`. These can today be written as separate programs, using the GHC API. An example of such a program would be a CTAGS-on-steroids tool that would let you, as part of compilation, output a file containing all the names in the program, together with their source locations and types. This file could then be used to implement a type and qualified names aware grep.
However, compiling every file twice, once normally and once using this hypothetical tool, just to get that additional output file, is wasteful. It would be better if we could specify a plugin that would run at one of a few well defined places in the pipeline e.g. after renaming or type checking. Those plugins could be passed the data structures (e.g. `HsSyn Id`) created by GHC and then perform some arbitrary action (e.g. write to a file or modify the AST.)",feature request,infoneeded,normal,7.12.1,Compiler,7.4.1,,,adamgundry,Unknown/Multiple,Unknown/Multiple,None/Unknown,,,,,