Open colin-adams opened 8 years ago
I intend to do this at some point in the indefinite future.
It would be great if this path were also available to the documentation system. This would let us include images and other resources in docstrings, or even include a manual and link from the string to the relevant section.
If some language feature is added for 3), then package organization suddenly becomes important to the language itself, rather than merely a feature of the external build system.
Melvar, a fair point. Maybe it can be done just as a library function though. I don't know.
Cabal does it (well it has data files rather than data directory - I personally need the latter - we could have both) by writing a module containing a function. We could do the same - idris --build would have to generate the module prior to type checking.
1) Add datadir = to ipkg files 2) Installing the package will recursively copy all files in the location specified by datadir to a location parallel to (?) the location where it installs the executable 3) A module should be able to find out where it's packages data directory is
The motiviation is that you can install a program that needs data files (for example, an example program in a web server library might need to look for static html or png files).