On Fri, 2006-12-29 at 09:53 -0800, Andy Gill wrote:
> That is sort of correct, it is more fine grain than line, but also  
> refers to an external file/name.
> 
> #LINE ==> where you are in your *haskell* source file (because  
> perhaps you moved line because of #includes, etc).
> 
> #GENERATED ==> This is part of your Haskell program, but this source  
> was derived (generated or quoted) from
> *another source file*.
> #GENERATED does not alter the internal SrcSpan's for this module in  
> anyway, much like {-# SCC ... and other pragmas.
> 
> A good example is happy. The actions are actually GENERATED from the  
> *.y file. The idea is that you can use Hpc to get
> coverage of a *grammar*, checking that you have actually tested your  
> complete parser. Reading the machine generated
> Haskell is painful :-)
> 
> I'm open to other named than GENERATED. The file aspect is just a  
> name, it could be a component name, the
> usage is domain specific. We could also generalize, and have lines  
> ranges, as well an spans.
> 
> Does this help? What do you think?

LINE can already refer to an external non-.hs file. This is exactly how
things works now with all manner of pre-processors, alex, happy, cpphs,
c2hs, hsc2hs, etc.

I don't quite have an intuition for this yet, can you give an example of
how this more fine grained pragma works and some use-case not currently
covered by LINE?

Duncan

_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to