
I'm trying to install the mtl package with the current HEAD version of Haskell, and I get the following error message:
Control/Monad/Error.hs:76:10: Duplicate instance declarations: instance Error e => Monad (Either e) -- Defined at Control/Monad/Error.hs:76:10-38 instance Monad (Either e) -- Defined in Control.Monad.Instances
Control/Monad/Error.hs:87:10: Duplicate instance declarations: instance Error e => MonadFix (Either e) -- Defined at Control/Monad/Error.hs:87:10-41 instance MonadFix (Either e) -- Defined in Control.Monad.Fix cabal: Error: some packages failed to install: mtl-1.1.0.2 failed during the building phase. The exception was: ExitFailure 1
The library installs fine with earlier versions of Haskell. Is there something wrong with my installation, or is this a new incompatibility? If the latter, is a corrected version of the mtl library going to be available soon? Alternatively, how can I fix it? Kathleen

The library installs fine with earlier versions of Haskell. Is there something wrong with my installation, or is this a new incompatibility? If the latter, is a corrected version of the mtl library going to be available soon? Alternatively, how can I fix it?
Yes, this is a new incompatibility. The instance in question recently moved from the mtl package to the base package, after discussion on this list. Until the next release of ghc/base/mtl, it will be necessary to use the HEAD versions of all of them (not merely the HEAD of ghc). Regards, Malcolm

malcolm.wallace:
The library installs fine with earlier versions of Haskell. Is there something wrong with my installation, or is this a new incompatibility? If the latter, is a corrected version of the mtl library going to be available soon? Alternatively, how can I fix it?
Yes, this is a new incompatibility. The instance in question recently moved from the mtl package to the base package, after discussion on this list.
Until the next release of ghc/base/mtl, it will be necessary to use the HEAD versions of all of them (not merely the HEAD of ghc).
And indeed ,the inverse patch has been applied to mtl,
Fri Jul 30 17:40:34 CEST 2010 Ross Paterson

Got it working. Thanks! Kathleen On Sep 2, 2010, at 12:44 AM, Don Stewart wrote:
malcolm.wallace:
The library installs fine with earlier versions of Haskell. Is there something wrong with my installation, or is this a new incompatibility? If the latter, is a corrected version of the mtl library going to be available soon? Alternatively, how can I fix it?
Yes, this is a new incompatibility. The instance in question recently moved from the mtl package to the base package, after discussion on this list.
Until the next release of ghc/base/mtl, it will be necessary to use the HEAD versions of all of them (not merely the HEAD of ghc).
And indeed ,the inverse patch has been applied to mtl,
Fri Jul 30 17:40:34 CEST 2010 Ross Paterson
* move Monad and MonadFix instances for Either to base (proposal #4159) _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries
participants (3)
-
Don Stewart
-
Kathleen Fisher
-
Malcolm Wallace