
28 May
2007
28 May
'07
7:35 p.m.
Hi Duncan,
list the support files in the "data-files:" stanza in the .cabal file. Then import the Paths_<pkg> module that Cabal generates for you. It exports a few functions including:
getDataDir :: IO FilePath
A few questions: 1) How do I test this? I'll need to develop in Hugs and GHC without going through Cabal building. Should I fake up a Paths_<pkg> module? 2) Is there any reasonable limit on the number of data files? Is 1000 too many? 3) Can I create files in this DataDir directory? It does seem that creating a new Paths_<pkg> module and include it is not very pleasant. It requires everyone to compile from source to get the paths working, which doesn't make much sense. Thanks Neil