In the project pandoc, Paths_pandoc is imported in Shared.hs. Paths_pandoc.hs is located in dist/build/autogen/. How is it generated and what does it do for pandoc.
In the project pandoc , Paths_pandoc is imported in Shared.hs. Paths_pandoc.hs is located in
Share
It’s a file that is generated by Cabal.
When you specify
Data-files:in your.cabalfile for your project, those files will be copied to a good location for “data files” on your system when you runcabal install. On Windows, this might be “C:\Program Files\Something” and on Linux it might be “/usr/share/something” (At least when you do a--systeminstall).Your code needs to know where the files were copied to, so Cabal generates that special module, which contains variables for the install paths that were used to copy the data files, so that your code can find the installed data files.
The module does also contain other information that Cabal provides for you, but the primary purpose of the module is what I just described.
See this blog post for more information.