18 Oct
                
                    2016
                
            
            
                18 Oct
                
                '16
                
            
            
            
        
    
                8:53 a.m.
            
        Dear Haskell-café, I am trying to write a small TH module which manipulates Haskell code. Basically, I have a function `transform :: Exp -> Q Exp` which I call this way:
g = $(transform [| map (+1) [1,2,3] |]) Since this is a source-to-source transformation, I would like to generate also {-# LINE ... #-} pragmas to point any error back to their original location. My question is: is there any way to obtain the location of sub-expressions inside a `Exp` or `Q Exp`?
Thanks in advance, Alejandro