2010/10/29 Dupont Corentin <corentin.dup...@gmail.com>: > Of course in module A I'm calling some functions of module B. > I'd like to know if it's possible, in a function of type SA, to call a > function of type SB, > without actually executing the State SB. > I just wanna tell him "Hey look, you can construct a SA from a SB like > this!"
> Also, I can't manage to write the more generic function SB x -> SA x. You can have a class that expresses the operations upon some B, e.g. class MonadB m where getB :: m b and then implement that class for both SA and SB. Or you can implement MonadTrans in order to write the more generic function SB x -> SA x. Possibly both but preferably the former imho. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe