Search Haskell Channel Logs

Monday, March 6, 2017

#haskell channel featuring glguy, monochrom, Rotaerk, mzabani, ezyang,

glguy 2017-03-06 13:51:12
mapReaderT :: (m a -> n b) -> ReaderT r m a -> ReaderT r n b
mzabani 2017-03-06 13:52:07
that's a lot of help.. thank you once again
mzabani 2017-03-06 13:52:46
I'll go scratch my head on implementing lift now..
mzabani 2017-03-06 14:14:24
guys, sorry to bother you again with this... but how can I implement lift without knowing anything about the underlying Monad?
ezyang 2017-03-06 14:14:31
mzabani: No.
ezyang 2017-03-06 14:14:46
Well, depends on what you mean
mzabani 2017-03-06 14:16:52
while trying to make my monad transformer an instance of MonadTrans, how can I separate "m" from "a" in "m a" to build "t m a" in lift?
glguy 2017-03-06 14:17:55
lift :: m a -> ReaderT m a
Rotaerk 2017-03-06 14:18:21
why do you want to separate the m from the a?
glguy 2017-03-06 14:18:21
lift :: m a -> ReaderT r m a
glguy 2017-03-06 14:18:27
TunnelT :: ReaderT r m a -> TunnelT m a
monochrom 2017-03-06 14:21:30
You don't have an unknown "t". It is your own transformer. You know how to implement lift for it.
monochrom 2017-03-06 14:21:49
But look at how StateT and ReaderT do it for examples.
mzabani 2017-03-06 14:22:03
oh gosh.. glguy just showed me what I had to see
mzabani 2017-03-06 14:22:56
thank you once again, I still have a hard time remembering the functions that are there for me to use most of the time.. it's been kind of a steep learning curve here
Rotaerk 2017-03-06 14:23:56
the haskell mountain is steep everywhere
Rotaerk 2017-03-06 14:30:04
well, I guess I shouldn't call it a mountain; it's more like a rabbit hole
Rotaerk 2017-03-06 14:31:13
though when I said steep everywhere, I really meant from every angle, rather than at ever elevation
Rotaerk 2017-03-06 14:32:02
every *
monochrom 2017-03-06 14:32:29
There is a Schwarzchild radius.