3 ms·
> definitely not every day defining their own bind or return as data. I mean, thunks? But yeah, certainly not at the level we usually think of when we talk ab
by dllthomas 5y ago
> definitely not every day defining their own bind or return as data.
I mean, thunks? But yeah, certainly not at the level we usually think of when we talk about defining data in Haskell.
But I can see labeling that an implementation issue. You need to get your dictionary to the right place somehow, and lacking the automatic type-driven threading of type classes I don't know that writing an interpreter for each is the wrong choice. For a lot of monads (reader, state, etc) you want an "interpreter" anyway. It does mean that regular values can't happen to have a relevant monad that you can use to stitch them together in a way that wasn't noticed by the person who created the value.