On Fri, Dec 30, 2011 at 07:55:05PM +0400, Serge D. Mechveliani wrote:
Dear GHC team,
The archive
http://botik.ru/pub/local/Mechveliani/ghcBugs/ghc741candQuest.zip
contains the source of the docon-2.12 application.
ghc-7.0.1 compiles it and runs the test successfully.
ghc-7.4.0.20111219 cannot compile it.
1. It requires to add Show a to Integral a in a certain place.
It occurs that this requirement breaks the standard (?).
But all right, so far, add Show a there and see what happens further.
2. It reports that certain two packages overlap at some module.
This is a matter of the `build-depends' field in docon.cabal
and of the import declarations.
I tried to correct the build-depends list.
But each time the compiler reports that
a) some packages overlapor
b) build-depends has a wrong line or
c) it cannot find some module (for example, Random).
Can you please, look into ghc741candQuest.zip and set there an appropriate
build-depends ?
(so thatmake configure
make build
make install
finish correctly).
How does the user guess of this list, what is the method?
The attached patch fixes docon so that it compiles under
ghc-7.4.0.20111219. Here is an explanation of the necessary changes:
* The haskell98 and base packages are no longer compatible, you must
choose one or the other. Choose 'haskell98' if you are coding
to the Haskell 98 standard, and base if you are coding to Haskell
2010. I deleted the haskell98 package from the build-depends.
* Module names like 'List', 'Maybe', 'Random' do not conform to the
Haskell 2010 standard; they must be replaced with Data.List,
Data.Maybe, and System.Random respectively.
* Also, base no longer includes System.Random, so the 'random'
package must be added to the build-depends field.
-Brent
diff -Naur docon/source/AlgSymmF.hs docon-fixed/source/AlgSymmF.hs
--- docon/source/AlgSymmF.hs 2011-02-26 12:48:32.0 -0500
+++ docon-fixed/source/AlgSymmF.hs 2011-12-31 00:28:17.206999683 -0500
@@ -179,7 +179,7 @@
where
import qualified Data.Map as Map (empty)
-import List (partition, genericLength, genericTake, genericDrop,
+import Data.List (partition, genericLength, genericTake, genericDrop,
genericReplicate)
import DPrelude (ct, ctr, factorial, sum1, product1, showsWithDom,
diff -Naur docon/source/Common_.hs docon-fixed/source/Common_.hs
--- docon/source/Common_.hs 2011-03-03 15:40:42.0 -0500
+++ docon-fixed/source/Common_.hs 2011-12-31 00:28:17.206999683 -0500
@@ -19,7 +19,7 @@
maxPartial, lexListComp
)
where
-import List (partition)
+import Data.List (partition)
import Prelude_ (Natural, Comparison, CompValue)
diff -Naur docon/source/Det_.hs docon-fixed/source/Det_.hs
--- docon/source/Det_.hs 2011-03-20 05:46:53.0 -0400
+++ docon-fixed/source/Det_.hs 2011-12-31 00:28:17.210332976 -0500
@@ -14,7 +14,7 @@
-- LinAlg reexports all needed from here.
(det, det_euc, maxMinor, delColumn, adjointMt)
where
-import List (genericLength, transpose)
+import Data.List (genericLength, transpose)
import DPrelude (Natural, sortE, product1, del_n_th, invSign, compBy,
showsn, showsWithDom)
diff -Naur docon/source/DExport.hs docon-fixed/source/DExport.hs
--- docon/source/DExport.hs 2005-06-20 08:36:51.0 -0400
+++ docon-fixed/source/DExport.hs 2011-12-31 00:28:17.210332976 -0500
@@ -14,18 +14,18 @@
module Pol, module Residue,module LinAlg,
module GBasis, module Partition, module AlgSymmF,
- module Complex,
+ module Data.Complex,
- module Prelude, module List, module Ratio, module Random
+ module Prelude, module Data.List, module Data.Ratio, module System.Random
)
where
-import Complex
+import Data.Complex
-import Listhiding (minimum, maximum, sort, sortBy)
+import Data.Listhiding (minimum, maximum, sort, sortBy)
import Prelude hiding (minimum, maximum, )
-import Ratio
-import Random
+import Data.Ratio
+import System.Random
import DPrelude
import Categs
diff -Naur docon/source/docon.cabal docon-fixed/source/docon.cabal
--- docon/source/docon.cabal 2011-03-02 02:39:04.0 -0500
+++ docon-fixed/source/docon.cabal 2011-12-31 00:14:53.056882730 -0500
@@ -12,7 +12,7 @@
-- should be like ghc-6.12.3 Hugs-5.5 ...
.
build-type: Simple
-build-depends: base, haskell98, containers
+build-depends: base, random, containers
--
-- hs-source-dirs: . parse auxil lin residue pol pol/factor
-- pol/symmfunc
diff -Naur docon/source/DPair_.hs docon-fixed/source/DPair_.hs
--- docon/source/DPair_.hs 2011-02-28 03:58:15.0 -0500
+++ docon-fixed/source/DPair_.hs 2011-12-31 00:28:17.210332976