Ticket #42 (new enhancement)
make hugs, nhc, lhc and Cabal agree on installed package info
|Reported by:||ijones||Owned by:||ross@…|
|Cc:||Difficulty:||hard (< 1 day)|
Description (last modified by ijones) (diff)
A pretty simple approach:
The package database is a list, mapping package names to directories. Maybe the gentoo folks and others would be happier if it's a directory where each file name is a package name and the content of that file is a directory to find the source for this package.
If we go the "don't alter hugs" route, we'd need a wrapper around hugs (maybe cabal) to read this file and add the -i flags to the hugs command-line.
So this could be implemented outside of hugs, with just cabal and hugs-pkg, then we could include a concept of a package database in the cabal interface to make toast / gentoo happy. In fact, we could do all that in Cabal without a hugs-pkg.
Of course, it would be nice if someone could say ":package foo" on the Hugs command-line, but that's not completely necessary. We could punt on that until we get more clear about the role of packages in the language.
When implementing this, be sure to add
- register step to cabal (register in hugs a little bit of something)
- hugs-pkg as a package tool
- command-line args to hugs or hugsWrap relating to the packages
Problems with not having hugs-pkg
- no way to tell hugs to turn packages on / off
- register / unregister don't make much sense
- no way to install into a non-standard location and expect hugs to find the package