Is -M perhaps what you’ve been looking for?

https://downloads.haskell.org/~ghc/7.8.3/docs/html/users_guide/separate-compilation.html#makefile-dependencies

-g


On November 27, 2014 at 5:32:01 AM, Lars Hupel (l...@hupel.info) wrote:
> > The only problem I see with that is that error message locations will be
> > a bit off, since the file being compiled is different from the file
> > submitted. But since we're in the hacks territory anyway, this could be
> > fixed up with a simple regex :-)
>  
> ... or line pragmas :-)
>  
> I'm currently investigating another route though. I wrote a simple
> program which parses some Haskell files with "haskell-src-exts" (we
> actually even need "hse-cpp"), builds a graph with all known
> dependencies, uses "topSort" from "Data.Graph" to come up with a proper
> ordering and prints the source files in that order. That approach feels
> a lot safer to me. It can be used like:
>  
> ghc -c $(cabal exec topoSort "${files[@]}")
>  
> (Never mind the obvious unsafe file name handling.)
>  
> The downside is that parse errors won't be reported by GHC, but by our
> preprocessing tool.
>  
> (I've attached the tool, but keep in mind it's just a quick proof of
> concept.)
>  
> Cheers
> Lars
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>  

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to