Describe the feature request
Cabal has the feature to generate a Paths_ module that exports utility functions to access data files; for example, it generates a 'getDataFileName :: FilePath -> IO FilePath' function that given a fileName/local filePath constructs the correct absolute path to the file in the data-directory set in the cabal file. See https://cabal.readthedocs.io/en/stable/cabal-package-description-file.html#accessing-data-files-from-package-code for details.
It would be nice if cabal could generate a similar functions that use OsPath rather than FilePath; since OsPath provides a better/more compact encoding of file paths. Perhaps it would be cleanest if cabal would actually generate a separate module (e.g. OsPaths_) that has the OsPath versions.
Describe the feature request
Cabal has the feature to generate a Paths_ module that exports utility functions to access data files; for example, it generates a 'getDataFileName :: FilePath -> IO FilePath' function that given a fileName/local filePath constructs the correct absolute path to the file in the data-directory set in the cabal file. See https://cabal.readthedocs.io/en/stable/cabal-package-description-file.html#accessing-data-files-from-package-code for details.
It would be nice if cabal could generate a similar functions that use OsPath rather than FilePath; since OsPath provides a better/more compact encoding of file paths. Perhaps it would be cleanest if cabal would actually generate a separate module (e.g. OsPaths_) that has the OsPath versions.