python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Breaking the loop
I have the following code sample:
data Smth = A | B
data MyError = MkMyError
data MyState = MkMyState
run :: [Smth] -> Either MyError (Maybe Integer)
run param =
evalState
( foldM
...
xbalaj
Votes: 0
Answers: 1
Instance inductivity as constraint
I'm trying to express an idea that given
instance (MonadTrans t, MonadX m) => MonadX (t m)
it should follow, that any t1 (t2 ... (tn m)) is also MonadX as long as all tx have MonadTrans instance. ...
Ryba
Votes: 0
Answers: 1
Binding a Maybe within another monad to avoid case stairway of doom?
I'm fetching a user from a database with a key I'm fetching from an api (uid). The uid is a Maybe ByteString, and so I can either case check whether it's a Maybe and then run the Redis monad, or someh...
staletidings
Votes: 0
Answers: 0
Couldn't match LoggingT with NoLoggingT
I have a following monad transformer stack including the monad-logger transformer and I want to be able to turn off logging by a parameter.
I can see, there is the NoLoggingT type but I don't know how...
xbalaj
Votes: 0
Answers: 1