RE: -package data in ghc-5.04.3

This refers the issues of `data' package (FiniteMap), user package setting
The Manual tells about `base' to replace `data'.
1. If I put to Main.hs
import FiniteMap main = putStr $ shows (fmToList $ listToFM $ zip "abc" "abc") "\n"
, then ghc -package data --make Main works. And ghc -package base --make Main reports ghc-5.04.3: chasing modules from: Main ghc-5.04.3: can't find module `FiniteMap' ...
The FiniteMap module from package 'data' is now available as Data.FiniteMap from package 'base' (there's no need to explicitly request 'base', it's always available).
2. Makefile sets my user package as it was with 5.02 : ... packDocon = Package {name = "\"docon\"", \ import_dirs = ["\"$(e)\""], \ source_dirs = ["\"$(e)\""], \ library_dirs = ["\"$(e)\""], \ hs_libraries = ["\"HSdocon\""], \ extra_libraries = [], \ include_dirs = [], \ c_includes = [], \ package_deps = [\"data\"], \ extra_ghc_opts = [$(extraPackageOpts)], \ extra_cc_opts = [], \ extra_ld_opts = [] } ...
ghc-5.04.3 reports: dependency `data' doesn't exist
This is a problem that will be fixed in the next release. For now, just omit the dependency.
Renaming data <- base gives similar report. After changing it to package_deps = [],
it reports:
--------------------------------- if [ ! -d /home/mechvel/docon/2.06/docon/source/export ]; then mkdir /home/mechvel/docon/2.06/docon/source/export; fi ghc-pkg -f /home/mechvel/docon/2.06/docon/source/docon.conf -l
echo Package {name = "\"docon\"", import_dirs = ["\"/home/mechvel/docon/2.06/docon/source/export\""], source_dirs = ["\"/home/mechvel/docon/2.06/docon/source/export\""], library_dirs = ["\"/home/mechvel/docon/2.06/docon/source/export\""], hs_libraries = ["\"HSdocon\""], extra_libraries = [], include_dirs = [], c_includes = [], package_deps = [], extra_ghc_opts = ["\"-package data\"", "\"-fno-warn-overlapping-patterns\"", "\"-fwarn-unused-binds\"", "\"-fwarn-unused-matches\"", "\"-fwarn-unused-imports\"", "\"-fglasgow-exts\"", "\"-fallow-overlapping-instances\"", "\"-fallow-undecidable-instances\"" ], extra_cc_opts = [], extra_ld_opts = [] } | ghc-pkg -f /home/mechvel/docon/2.06/docon/source/docon.conf -a
Reading package info from stdin... done. Expanding embedded variables...done. cannot find `libHSdocon.a' on library path
The error is self-explanatory: it can't find libHSdocon.a on the path given in the package specification. It looks like you might have some extra quotation marks in there. Also, I wouldn't put '-package data' in extra_ghc_opts. I think that is unlikely to work. Cheers, Simon
participants (1)
-
Simon Marlow