monad-transformers
scalaz List[StateT].sequence - could not find implicit value for parameter n: scalaz.Applicative
I\'m trying to figure out how to use StateT to combine two State state transformers based o开发者_运维问答n a comment on my Scalaz state monad examples answer.[详细]
2023-04-13 02:27 分类:问答Requires MonadPlus (ST a) Instance
I\'m reading the paper Typed Logical Variables in Haskell, but I\'m failing to understand the details of the ultimate implementation. In particular, the backtracking state transformer introduced in se[详细]
2023-04-11 20:58 分类:问答monads-tf: MonadReader instance for MonadState
Consider the next example. I have a monad MyM that is just a StateT {-# LANGUAGE TypeFamilies #-} import Control.Monad.State[详细]
2023-04-02 20:01 分类:问答Applicatives compose, monads don't
Applicatives compose, monads don\'t. What does the above state开发者_运维问答ment mean? And when is one preferable to other?If we compare the types[详细]
2023-03-28 05:05 分类:问答What is the name of this Monad Stack function?
I\'ve got a bunch of stateful functions inside a State monad. At one point in the program there needs to be some IO actions so I\'ve wrapped IO inside a StateT getting a pair of types like this:[详细]
2023-03-05 00:04 分类:问答Design of interface abstraction
Currently, I try to write a small game program (Skat) as a hobby project. Skat is a trick-taking game were two players play against a single player. As there are different kinds of players (lokal play[详细]
2023-02-28 22:00 分类:问答Is there a `replicateM` function for the internal monad in a monad transformer?
Suppose I have something like this: data Environment = ... data MyState = ...开发者_如何学C data Report= ...[详细]
2023-02-17 18:02 分类:问答Why changing the Data.Binary.Put monad into a transformer creates a memory leak?
I\'m trying to modify the Data.Binary.PutM monad into a monad transformer. So I started by changin it\'s definition from[详细]
2023-02-15 22:12 分类:问答Why wrapping the Data.Binary.Put monad creates a memory leak? (Part 2)
As in my previous question, I\'m trying to wrap the Data.Binary.Put monad into another monad so that later I can ask it questions like \"how many bytes it\'s going to write\" or \"what is the current[详细]
2023-02-11 02:18 分类:问答Using the reader monad in snap (or, monad transformers in snap)
Can someone show how to use the snap monad inside the reader monad?Monad transformers confuse me.(Alternatively, I will gladly accept suggestions of tutorials about monad transformers, and ways to see[详细]
2023-02-08 17:32 分类:问答