-package data in ghc-5.04.3
Serge D. Mechveliani
mechvel@botik.ru
Wed, 7 May 2003 15:18:53 +0400
Dear GHC team,
I am trying to build my DoCon program under
ghc-5.04.3, built from RPM
And the installation Makefile for ghc-5.02
does not work for 5.04.3.
Could you, please, tell me how to correct it?
Thank you in advance for the help.
-----------------
Serge Mechveliani
mechvel@botik.ru
-----------------------------------------------------------------
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' ...
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
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
make: *** [init] Error 1