I didn't realize the State monad wasn't part of the base install. Any particular reason for this?
-deech
On 28 July 2010 13:17, michael rice <nowgate@yahoo.com> wrote:Yeah, the install is OK. The meaning of the warnings are:
>
> See below. Lot's of warnings. Is the install OK? If so, can I use the same *import*?
* "Warning: -fallow-undecidable-instances is deprecated:" this GHC
option has changed name, but the mtl package still uses the old name.
* "Warning: Module `Prelude' is deprecated:" mtl doesn't specify any
bounds on the version of the base library to be used (mainly because
of historic reasons when it wasn't changing much and the Haskell
community wasn't stressing versioning as much; note that the last
version of mtl was released almost 2 years ago). Because a lot of
packages broke when GHC-6.10.4 started shipping with base-4 (along
with base-3 for compatability purposes) due to the differences in how
exceptions were handled, if there is no upper bound on the version of
base to be used then cabal-install plays it safe and uses base-3.
However, the next version of GHC (6.14, which should be coming out
later this year) will not ship with base-3, so GHC-6.12 included that
warning message for people that kept trying to use base-3 that their
code won't work with 6.14.
So yes, now you can use "import Control.Monad.State".
>
> Michael
>
> --- On Tue, 7/27/10, Ivan Miljenovic <ivan.miljenovic@gmail.com> wrote:
>
> >
> > If it isn't installed, you can use cabal-install to install it:
> >
> > cabal install mtl
> >
> > --
> > Ivan Lazar Miljenovic
> > Ivan.Miljenovic@gmail.com
> > IvanMiljenovic.wordpress.com
> >
>
>
> [michael@localhost ~]$ cabal install mtl
> Resolving dependencies...
> Downloading mtl-1.1.0.2...
> Configuring mtl-1.1.0.2...
> Preprocessing library mtl-1.1.0.2...
> Building mtl-1.1.0.2...
> [ 1 of 21] Compiling Control.Monad.Identity ( Control/Monad/Identity.hs, dist/build/Control/Monad/Identity.o )
>
> Control/Monad/Cont.hs:1:11:
> Warning: -fallow-undecidable-instances is deprecated: use -XUndecidableInstances or pragma {-# LANGUAGE UndecidableInstances #-} instead
>
> Control/Monad/Cont/Class.hs:1:11:
> Warning: -fallow-undecidable-instances is deprecated: use -XUndecidableInstances or pragma {-# LANGUAGE UndecidableInstances #-} instead
>
> Control/Monad/Error.hs:1:11:
> Warning: -fallow-undecidable-instances is deprecated: use -XUndecidableInstances or pragma {-# LANGUAGE UndecidableInstances #-} instead
>
> Control/Monad/Error/Class.hs:1:11:
> Warning: -fallow-undecidable-instances is deprecated: use -XUndecidableInstances or pragma {-# LANGUAGE UndecidableInstances #-} instead
>
> Control/Monad/Identity.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
>
> Control/Monad/List.hs:1:11:
> Warning: -fallow-undecidable-instances is deprecated: use -XUndecidableInstances or pragma {-# LANGUAGE UndecidableInstances #-} instead
>
> Control/Monad/RWS/Lazy.hs:1:11:
> Warning: -fallow-undecidable-instances is deprecated: use -XUndecidableInstances or pragma {-# LANGUAGE UndecidableInstances #-} instead
>
> Control/Monad/RWS/Strict.hs:1:11:
> Warning: -fallow-undecidable-instances is deprecated: use -XUndecidableInstances or pragma {-# LANGUAGE UndecidableInstances #-} instead
>
> Control/Monad/Reader.hs:2:11:
> Warning: -fallow-undecidable-instances is deprecated: use -XUndecidableInstances or pragma {-# LANGUAGE UndecidableInstances #-} instead
>
> Control/Monad/Reader/Class.hs:1:11:
> Warning: -fallow-undecidable-instances is deprecated: use -XUndecidableInstances or pragma {-# LANGUAGE UndecidableInstances #-} instead
>
> Control/Monad/State/Lazy.hs:1:11:
> Warning: -fallow-undecidable-instances is deprecated: use -XUndecidableInstances or pragma {-# LANGUAGE UndecidableInstances #-} instead
>
> Control/Monad/State/Strict.hs:1:11:
> Warning: -fallow-undecidable-instances is deprecated: use -XUndecidableInstances or pragma {-# LANGUAGE UndecidableInstances #-} instead
>
> Control/Monad/Writer.hs:1:11:
> Warning: -fallow-undecidable-instances is deprecated: use -XUndecidableInstances or pragma {-# LANGUAGE UndecidableInstances #-} instead
>
> Control/Monad/Writer/Class.hs:1:11:
> Warning: -fallow-undecidable-instances is deprecated: use -XUndecidableInstances or pragma {-# LANGUAGE UndecidableInstances #-} instead
>
> Control/Monad/Writer/Lazy.hs:1:11:
> Warning: -fallow-undecidable-instances is deprecated: use -XUndecidableInstances or pragma {-# LANGUAGE UndecidableInstances #-} instead
>
> Control/Monad/Writer/Strict.hs:1:11:
> Warning: -fallow-undecidable-instances is deprecated: use -XUndecidableInstances or pragma {-# LANGUAGE UndecidableInstances #-} instead
> [ 2 of 21] Compiling Control.Monad.Writer.Class ( Control/Monad/Writer/Class.hs, dist/build/Control/Monad/Writer/Class.o )
>
> Control/Monad/Writer/Class.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
> [ 3 of 21] Compiling Control.Monad.Error.Class ( Control/Monad/Error/Class.hs, dist/build/Control/Monad/Error/Class.o )
>
> Control/Monad/Error/Class.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
> [ 4 of 21] Compiling Control.Monad.State.Class ( Control/Monad/State/Class.hs, dist/build/Control/Monad/State/Class.o )
>
> Control/Monad/State/Class.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
> [ 5 of 21] Compiling Control.Monad.Reader.Class ( Control/Monad/Reader/Class.hs, dist/build/Control/Monad/Reader/Class.o )
>
> Control/Monad/Reader/Class.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
> [ 6 of 21] Compiling Control.Monad.RWS.Class ( Control/Monad/RWS/Class.hs, dist/build/Control/Monad/RWS/Class.o )
>
> Control/Monad/RWS/Class.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
> [ 7 of 21] Compiling Control.Monad.Trans ( Control/Monad/Trans.hs, dist/build/Control/Monad/Trans.o )
>
> Control/Monad/Trans.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
>
> Control/Monad/Trans.hs:26:0:
> Warning: The import of `System.IO' is redundant
> except perhaps to import instances from `System.IO'
> To import instances alone, use: import System.IO()
> [ 8 of 21] Compiling Control.Monad.Cont.Class ( Control/Monad/Cont/Class.hs, dist/build/Control/Monad/Cont/Class.o )
>
> Control/Monad/Cont/Class.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
> [ 9 of 21] Compiling Control.Monad.Reader ( Control/Monad/Reader.hs, dist/build/Control/Monad/Reader.o )
>
> Control/Monad/Reader.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
> [10 of 21] Compiling Control.Monad.Error ( Control/Monad/Error.hs, dist/build/Control/Monad/Error.o )
>
> Control/Monad/Error.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
>
> Control/Monad/Error.hs:57:0:
> Warning: The import of `Control.Monad.Reader.Class' is redundant
> except perhaps to import instances from `Control.Monad.Reader.Class'
> To import instances alone, use: import Control.Monad.Reader.Class()
>
> Control/Monad/Error.hs:58:0:
> Warning: The import of `Control.Monad.State.Class' is redundant
> except perhaps to import instances from `Control.Monad.State.Class'
> To import instances alone, use: import Control.Monad.State.Class()
>
> Control/Monad/Error.hs:60:0:
> Warning: The import of `Control.Monad.Writer.Class' is redundant
> except perhaps to import instances from `Control.Monad.Writer.Class'
> To import instances alone, use: import Control.Monad.Writer.Class()
>
> Control/Monad/Error.hs:63:0:
> Warning: The import of `System.IO' is redundant
> except perhaps to import instances from `System.IO'
> To import instances alone, use: import System.IO()
> [11 of 21] Compiling Control.Monad.List ( Control/Monad/List.hs, dist/build/Control/Monad/List.o )
>
> Control/Monad/List.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
> [12 of 21] Compiling Control.Monad.RWS.Lazy ( Control/Monad/RWS/Lazy.hs, dist/build/Control/Monad/RWS/Lazy.o )
>
> Control/Monad/RWS/Lazy.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
>
> Control/Monad/RWS/Lazy.hs:45:0:
> Warning: The import of `Control.Monad.Reader.Class' is redundant
> except perhaps to import instances from `Control.Monad.Reader.Class'
> To import instances alone, use: import Control.Monad.Reader.Class()
>
> Control/Monad/RWS/Lazy.hs:46:0:
> Warning: The import of `Control.Monad.State.Class' is redundant
> except perhaps to import instances from `Control.Monad.State.Class'
> To import instances alone, use: import Control.Monad.State.Class()
>
> Control/Monad/RWS/Lazy.hs:48:0:
> Warning: The import of `Control.Monad.Writer.Class' is redundant
> except perhaps to import instances from `Control.Monad.Writer.Class'
> To import instances alone, use: import Control.Monad.Writer.Class()
> [13 of 21] Compiling Control.Monad.RWS ( Control/Monad/RWS.hs, dist/build/Control/Monad/RWS.o )
>
> Control/Monad/RWS.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
> [14 of 21] Compiling Control.Monad.RWS.Strict ( Control/Monad/RWS/Strict.hs, dist/build/Control/Monad/RWS/Strict.o )
>
> Control/Monad/RWS/Strict.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
>
> Control/Monad/RWS/Strict.hs:45:0:
> Warning: The import of `Control.Monad.Reader.Class' is redundant
> except perhaps to import instances from `Control.Monad.Reader.Class'
> To import instances alone, use: import Control.Monad.Reader.Class()
>
> Control/Monad/RWS/Strict.hs:46:0:
> Warning: The import of `Control.Monad.State.Class' is redundant
> except perhaps to import instances from `Control.Monad.State.Class'
> To import instances alone, use: import Control.Monad.State.Class()
>
> Control/Monad/RWS/Strict.hs:48:0:
> Warning: The import of `Control.Monad.Writer.Class' is redundant
> except perhaps to import instances from `Control.Monad.Writer.Class'
> To import instances alone, use: import Control.Monad.Writer.Class()
> [15 of 21] Compiling Control.Monad.State.Lazy ( Control/Monad/State/Lazy.hs, dist/build/Control/Monad/State/Lazy.o )
>
> Control/Monad/State/Lazy.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
> [16 of 21] Compiling Control.Monad.State ( Control/Monad/State.hs, dist/build/Control/Monad/State.o )
>
> Control/Monad/State.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
> [17 of 21] Compiling Control.Monad.State.Strict ( Control/Monad/State/Strict.hs, dist/build/Control/Monad/State/Strict.o )
>
> Control/Monad/State/Strict.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
> [18 of 21] Compiling Control.Monad.Writer.Lazy ( Control/Monad/Writer/Lazy.hs, dist/build/Control/Monad/Writer/Lazy.o )
>
> Control/Monad/Writer/Lazy.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
> [19 of 21] Compiling Control.Monad.Writer ( Control/Monad/Writer.hs, dist/build/Control/Monad/Writer.o )
>
> Control/Monad/Writer.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
> [20 of 21] Compiling Control.Monad.Writer.Strict ( Control/Monad/Writer/Strict.hs, dist/build/Control/Monad/Writer/Strict.o )
>
> Control/Monad/Writer/Strict.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
> [21 of 21] Compiling Control.Monad.Cont ( Control/Monad/Cont.hs, dist/build/Control/Monad/Cont.o )
>
> Control/Monad/Cont.hs:1:0:
> Warning: Module `Prelude' is deprecated:
> You are using the old package `base' version 3.x.
> Future GHC versions will not support base version 3.x. You
> should update your code to use the new base version 4.x.
> Registering mtl-1.1.0.2...
> Installing library in /home/michael/.cabal/lib/mtl-1.1.0.2/ghc-6.12.1
> Registering mtl-1.1.0.2...
> [michael@localhost ~]$
>
>
--
Ivan Lazar Miljenovic
Ivan.Miljenovic@gmail.com
IvanMiljenovic.wordpress.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe