[email protected]
[Top] [All Lists]

[Haskell-cafe] Use of the Try typeclass

Subject: [Haskell-cafe] Use of the Try typeclass
From: "Edward Z. Yang"
Date: Wed, 30 Dec 2009 20:52:06 -0500
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:

    [email protected]:~/Documents/tmr$ ghci
    Prelude> :m +Control.Failure
    Prelude Control.Failure> :m +Control.Monad.Failure
    Prelude Control.Failure Control.Monad.Failure> :t failure

    <interactive>: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
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>