#readert
so the way i write ocaml is essentially like ReaderT IO but without the ReaderT and without the IO
November 11, 2024 at 12:21 AM
So, anyone here wants to hear about Web backend architecture in OCaml using lenses, the ReaderT monad and Polymorphic Variants?
November 27, 2024 at 3:37 PM
reggelente a google readert megnyitni, aaaahhh. Hiányzik.
January 5, 2025 at 10:53 AM
yes!!! obviously
(also ReaderT in ocaml is pretty interesting)
November 27, 2024 at 3:42 PM
De, a Google Readert.
May 23, 2025 at 10:16 PM
FP compiler folks, where should I look into if I want to optimize code generation for constructions like ReaderT/StateT?
January 13, 2025 at 4:58 PM
love effectful

ironically it's what made me understood ReaderT over IO back then
December 14, 2025 at 2:45 PM
"viszek e readert is, hatha masik konyvhoz lenne kedvem, telora meg hangoskonyvet toltok le" - egyiket sem vettem elo es telefonoztam, minden egyes alkalommal 🤡
May 6, 2025 at 12:51 PM
Part 10 of my Higher Kinds in C# series is now available. Continuing the monad transformers story with ReaderT. I'm going to spend a little longer on these transformers as it's relatively new idea for c#-land. #csharp #dotnet #fp #languageext #monad #readert

paullouth.com/higher-kinds...
Higher Kinds in C# with language-ext [Part 10- ReaderT monad transformer]
A look at the ReaderT monad transformer and the general Readable trait that allows generalised access to types with embedded environments.
paullouth.com
August 18, 2024 at 6:19 PM
New release: linear-base v0.8.0 github.com/tweag/linear... . With some love shown to the resource-aware IO monad from contributor @dfacastro.bsky.social in support of their fascinating linear-locks library hackage.haskell.org/package/line...
Release v0.8.0 · tweag/linear-base
Full Changelog Headline changes Add MonadIO instances for StateT and ReaderT #506 (dcastro) Coerce System.IO and Linear.IO into RIO #505 (dcastro)
github.com
May 19, 2026 at 7:15 AM
really the only thing ReaderT has to do with global variables is that it gives you access to a value without needing to thread it through every call.
but that makes it an implicit parameter, not a global variable
March 29, 2026 at 9:56 PM
Meguntam, hogy adobe readert használjak, váltottam Okular-ra, megörültem, hogy az epubot is olvassa, erre kiderült, hogy vagy egy évtizede nem frissítik azt a részét... :p
February 14, 2026 at 4:48 PM
yeah pretty much. e.g. in effectful `Eff es` is just `ReaderT (Env es) IO` (www.stackage.org/haddock/lts-...) where `Env es` is an extensible record of handlers (www.stackage.org/haddock/lts-...) ...
www.stackage.org
December 14, 2025 at 12:32 AM
doesn't effect just have a single monad that is essentially a combination of ReaderT/StateT/ExceptT/CoroutineT?
May 24, 2025 at 10:28 AM
if you really do need to allow more than one monad, the better way would be to use something like effectful that operates on a concrete and performant monad (it's basically ReaderT IO internally) but still allows effect polymorphism
hackage.haskell.org/package/effe...
effectful
An easy to use, performant extensible effects library.
hackage.haskell.org
March 8, 2026 at 3:52 PM
Haskell take of unknown temperature: it's annoying that most popular ways of structuring applications involve some kind of monad transformer (even if it's only ReaderT). Mostly because these often require a twist on the way of handling errors/exceptions in base. They're fine for local use though.
July 6, 2025 at 8:41 AM
Oh definitely worse when I am tired. When I am tired, my eyes are worse so I at least have my screen readert to help.
January 21, 2026 at 4:45 PM
hang on i can rewrite this

fmap f ReaderT ( g ) = (\x -> fmap f (g x))

join ReaderT ( g ) = (\x -> join (fmap ($ x) g x))

x >>= f = join (fmap f x)

which is uhhhh

...eve more complicated lol
December 18, 2023 at 12:56 AM
Part 12 of my Higher Kinds in C# series is up now. Following on from ReaderT and StateT, we finish the transformer-triplet with WriterT #csharp #dotnet #languageext #monad #transformer #fp

paullouth.com/higher-kinds...
Higher Kinds in C# with language-ext [Part 12- WriterT monad transformer]
The WriterT monad transformer allows for aggregating output using pure expressions.
paullouth.com
October 20, 2024 at 8:54 PM
all of the monad transformers are crazy, because they seem so mysterious even though they say exactly what they are

ReaderT r m a, you use it with runReaderT :: r -> m a

and like

ReaderT is literally just a record with runReaderT as its only member

its just a r -> m a
December 18, 2023 at 12:36 AM
well it doesn't actually though! for two reasons:
1) the problem with global variables is that they're mutable (immutable global variables are just... definitions) but ReaderT is not
2) the way that problem manifests is that any *usages* of the variable are inherently coupled (that's the global bit)
March 29, 2026 at 9:56 PM
and that's a huge problem because it means code that uses global variables is hard to parallelize, hard to reason about and might not even work more than once.

ReaderT has none of those issues because it's *not* global. it is scoped to the usage (i.e. the runReaderT call)
March 29, 2026 at 9:56 PM
The writer monad is, likewise, very simple. It's just a tuple, (w, a)

The state monad is therefore just a composition of a writer and a reader, s -> (s, a), ReaderT s (Writer s) a
December 18, 2023 at 12:53 PM
I don't use “tagless final” as I like #OOP, and object algebras can be equivalent. OOP interfaces & composition can be used for dealing with dependencies, instead of TF, or ReaderT, or a fat monad. And implicit params (givens) are good, too, even without the F[_] 🤷‍♂️

#Scala
March 17, 2024 at 8:30 AM
Oh god I feel for you.

I also feel for whoever has to pick up my code that’s chock full of the crocks library. Like I’m sure there are 5 other devs that do JS this way, using Async, ReaderT, Maybe, Either.

This is why I have to run my own company, so I can do things this terrible way 🤭
August 4, 2025 at 8:56 PM