ether icon indicating copy to clipboard operation
ether copied to clipboard

Flattening monadic layers

Open int-index opened this issue 9 years ago • 4 comments

I believe that the performance could be improved greatly if there was a way to flatten monadic effects.

int-index avatar Jan 28 '16 17:01 int-index

Ok, there's a working prototype for ReaderT now (and the benchmarks show that it's as fast as mtl).

int-index avatar May 02 '16 22:05 int-index

compound-types looks like a good candidate for Sum/Product types to use with flattening of implicitly tagged transformers.

int-index avatar Dec 13 '16 12:12 int-index

I'm just exploring this space, but there is also http://hackage.haskell.org/package/data-has which might be useful

jberryman avatar Mar 22 '17 19:03 jberryman

Yes, I've seen it. What I don't like about the data-has package is that its Has class doesn't define a lens, it defines a getter and a setter. For types with non constant time access this is important, because with a lens you traverse the structure just once to modify a value, whereas with a getter/setter pair you'd have to do it twice (first to get a value, then to set a new one).

int-index avatar Mar 22 '17 19:03 int-index