Re: [Haskell-cafe] Use of the Try typeclass

2010-01-01 Thread Edward Z. Yang
Excerpts from Edward Z. Yang's message of Fri Jan 01 13:27:49 -0500 2010:
> I upgraded, but now both Control.Monad.Failure and Control.Monad.Error
> claim to be exporting "Error". Is this correct, and if so, which one
> should I hide?

Sorry my bad; I should have been importing Control.Monad.Failure.MTL.
The error has gone away.

Cheers,
Edwadrd
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Use of the Try typeclass

2010-01-01 Thread Edward Z. Yang
I upgraded, but now both Control.Monad.Failure and Control.Monad.Error
claim to be exporting "Error". Is this correct, and if so, which one
should I hide?

Cheers,
Edward
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Use of the Try typeclass

2009-12-31 Thread Michael Snoyman
I think you need to run "cabal update"

On Thu, Dec 31, 2009 at 8:54 AM, Edward Z. Yang  wrote:

> Excerpts from Michael Snoyman's message of Thu Dec 31 00:43:52 -0500 2009:
> > What version of the packages are you using? Can you give the output of:
> >
> > ghc-pkg list|grep failure
>
> Sure thing:
>
>(control-monad-failure-0.4), (control-monad-failure-0.5.0),
>control-monad-failure-mtl-0.5.0, cpphs-1.8, cpphs-1.9,
>failure-0.0.0.1, happstack-0.3.2, happstack-data-0.3.3
>
> Additionally:
>
> ezy...@javelin:~$ cabal upgrade failure
> Resolving dependencies...
> No packages to be installed. All the requested packages are already
> installed.
> If you want to reinstall anyway then use the --reinstall flag.
>
> Cheers,
> Edward
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Use of the Try typeclass

2009-12-30 Thread Alexander Dunlap
On Wed, Dec 30, 2009 at 10:54 PM, Edward Z. Yang  wrote:
> Excerpts from Michael Snoyman's message of Thu Dec 31 00:43:52 -0500 2009:
>> What version of the packages are you using? Can you give the output of:
>>
>> ghc-pkg list|grep failure
>
> Sure thing:
>
>    (control-monad-failure-0.4), (control-monad-failure-0.5.0),
>    control-monad-failure-mtl-0.5.0, cpphs-1.8, cpphs-1.9,
>    failure-0.0.0.1, happstack-0.3.2, happstack-data-0.3.3
>
> Additionally:
>
> ezy...@javelin:~$ cabal upgrade failure
> Resolving dependencies...
> No packages to be installed. All the requested packages are already installed.
> If you want to reinstall anyway then use the --reinstall flag.
>
> Cheers,
> Edward
>

Upgrade to control-monad-failure-mtl 0.6.0 and control-monad-failure 0.6.0.

Alex
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Use of the Try typeclass

2009-12-30 Thread Edward Z. Yang
Excerpts from Michael Snoyman's message of Thu Dec 31 00:43:52 -0500 2009:
> What version of the packages are you using? Can you give the output of:
> 
> ghc-pkg list|grep failure

Sure thing:

(control-monad-failure-0.4), (control-monad-failure-0.5.0),
control-monad-failure-mtl-0.5.0, cpphs-1.8, cpphs-1.9,
failure-0.0.0.1, happstack-0.3.2, happstack-data-0.3.3

Additionally:

ezy...@javelin:~$ cabal upgrade failure
Resolving dependencies...
No packages to be installed. All the requested packages are already installed.
If you want to reinstall anyway then use the --reinstall flag.

Cheers,
Edward
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Use of the Try typeclass

2009-12-30 Thread Michael Snoyman
Edward,

What version of the packages are you using? Can you give the output of:

ghc-pkg list|grep failure

Michael

On Thu, Dec 31, 2009 at 7:11 AM, Edward Z. Yang  wrote:

> Excerpts from Alexander Dunlap's message of Thu Dec 31 00:06:58 -0500 2009:
> > Why are you importing both Control.Failure and Control.Monad.Failure
> > when the latter just re-exports the former? Are you using the latest
> > versions of the two packages? Try importing just
> > Control.Monad.Failure.MTL; that provides the MTL failure instances and
> > also re-exports Control.Failure.
>
> That's correct. I imported both when Control.Monad.Failure.MTL failed
> to expose try:
>
> ezy...@javelin:~/Dev/wizard$ ghci
> Prelude> :m +Control.Monad.Failure.MTL
> Prelude Control.Monad.Failure.MTL> :t try
>
> :1:0: Not in scope: `try'
>
> Which, doesn't really seem like it should be the case.
>
> Cheers,
> Edward
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Use of the Try typeclass

2009-12-30 Thread Edward Z. Yang
Excerpts from Alexander Dunlap's message of Thu Dec 31 00:06:58 -0500 2009:
> Why are you importing both Control.Failure and Control.Monad.Failure
> when the latter just re-exports the former? Are you using the latest
> versions of the two packages? Try importing just
> Control.Monad.Failure.MTL; that provides the MTL failure instances and
> also re-exports Control.Failure.

That's correct. I imported both when Control.Monad.Failure.MTL failed
to expose try:

ezy...@javelin:~/Dev/wizard$ ghci
Prelude> :m +Control.Monad.Failure.MTL
Prelude Control.Monad.Failure.MTL> :t try

:1:0: Not in scope: `try'

Which, doesn't really seem like it should be the case.

Cheers,
Edward
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Use of the Try typeclass

2009-12-30 Thread Alexander Dunlap
On Wed, Dec 30, 2009 at 5:52 PM, Edward Z. Yang  wrote:
> Hello all,
>
> I am currently playing with the new cadre of failure libraries, and I'm
> trying to figure out how to use the monadic version of Failure while
> also getting the Try typeclass, which appears to be the standardized mechanism
> for marshalling values from specific monads into the failure monad.
> Unfortunately, it only seems to be defined when I import Control.Failure,
> and this module is fairly incompatible with Control.Monad.Failure, as
> demonstrated by this GHCI transcript:
>
>    ezy...@javelin:~/Documents/tmr$ ghci
>    Prelude> :m +Control.Failure
>    Prelude Control.Failure> :m +Control.Monad.Failure
>    Prelude Control.Failure Control.Monad.Failure> :t failure
>
>    :1:0:
>        Ambiguous occurrence `failure'
>        It could refer to either `Control.Failure.failure', imported from 
> Control.Failure
>                              or `Control.Monad.Failure.failure', imported 
> from Control.Monad.Failure
>
> I'm using MTL, which might be the reason why there's all sorts of 
> unhappiness. :-)
>
> Cheers,
> Edward
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>

Why are you importing both Control.Failure and Control.Monad.Failure
when the latter just re-exports the former? Are you using the latest
versions of the two packages? Try importing just
Control.Monad.Failure.MTL; that provides the MTL failure instances and
also re-exports Control.Failure.

Alex
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Use of the Try typeclass

2009-12-30 Thread Edward Z. Yang
Hello all,

I am currently playing with the new cadre of failure libraries, and I'm
trying to figure out how to use the monadic version of Failure while
also getting the Try typeclass, which appears to be the standardized mechanism
for marshalling values from specific monads into the failure monad.
Unfortunately, it only seems to be defined when I import Control.Failure,
and this module is fairly incompatible with Control.Monad.Failure, as
demonstrated by this GHCI transcript:

ezy...@javelin:~/Documents/tmr$ ghci
Prelude> :m +Control.Failure
Prelude Control.Failure> :m +Control.Monad.Failure
Prelude Control.Failure Control.Monad.Failure> :t failure

:1:0:
Ambiguous occurrence `failure'
It could refer to either `Control.Failure.failure', imported from 
Control.Failure
  or `Control.Monad.Failure.failure', imported from 
Control.Monad.Failure

I'm using MTL, which might be the reason why there's all sorts of unhappiness. 
:-)

Cheers,
Edward
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe