The difficulty is that renamer and type-checker are mutually recursive because of Template Haskell. I've been looking into this a while ago and I have a basic idea how a better API could look like, but I haven't sorted out the details.
One very hacky workaround -- and I'm not sure whether it can actually work -- is to copy the file TcRnDriver from the GHC sources and modify it to do what you need. It wouldn't be an easy task, though. On 12 May 2010 14:35, Phyx <[email protected]> wrote: > Hi all, > > > > I was wondering if it’s possible to get to the renamed source before > actually typechecking, > > > > I currently have > > > > parsed <- parse modName > > checked <- typecheckModule parsed > > let renamed = tm_renamed_source checked > > value = tm_typechecked_source checked > > > > but if typechecking failes, I get no information at all (an error), while I > should be able to still get the renamed source. > > Any suggestions? > > > > Cheers, > > Phyx > > _______________________________________________ > Haskell-Cafe mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/haskell-cafe > > -- Push the envelope. Watch it bend. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
