Generalize MAC to MACT to use any underlying monad
fredefox
Branch: fredefox/mac-lib:monad-trans
Branch: russo/mac-lib:master
Declined
Declined pull request
Nice code, but I will leave it simple without transformers.
Closed by: Alejandro Russo·2019-08-29
This makes
MACT
a monad transformer. It's very similar to the identity monad transformer. It's actually exactly the same, except thatMACT
has the phantom typel
.In keeping with the spirit of the style in
mtl
I have put the underlying monad as the second-to-last type parameter ofMACT
. Also in keeping with the style ofmtl
I have madeMAC l a
a type-synonym forMAC l Identity a
So not with
IO
as the underlying monad. I believe this is the only sensible choice, but I'm willing to let myself be convinced to the contrary.