You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Breaking apart the instance reveals what goes wrong:
local id localTheCont
=ContC$\c ->
i <- ask
local id$ runContC localTheCont (local (const i) . c)
=ContC$\c ->
i <- ask
local id$ local (+1) ((local (const i) . c) ())
=ContC$\c ->
i <- ask
local (const i . (+1) .id) (c ())
=ContC$\c ->
i <- ask
local (const i) (c ())
Removing the instance would undoubtedly cause too much breakage, but perhaps a warning in the docs is warranted.
The text was updated successfully, but these errors were encountered:
It is known that Reader for Cont is a bit wonky. For me this seems like another argument for splitting up MonadReader into the ask and local parts. That said that transition will be painful and may have to be part of a large scale mtl 3 shift.
We'd expect
local id == id
, but this isn't true forContT
.Let:
then
Breaking apart the instance reveals what goes wrong:
Removing the instance would undoubtedly cause too much breakage, but perhaps a warning in the docs is warranted.
The text was updated successfully, but these errors were encountered: