memoize icon indicating copy to clipboard operation
memoize copied to clipboard

Derive Memoizable with Generics?

Open abbradar opened this issue 10 years ago • 1 comments

It would certainly be nice to remove usage of TH at all, using GHC Generics to derive needed Memoizable instances. However, I haven't looked deep in the code, so I don't know whether this is possible for them.

abbradar avatar Apr 03 '15 02:04 abbradar

It seems like it should be possible, and the approach isn't complicated. The memo cache trie is essentially the first derivative of the domain to be memoized.

J

On Thu, Apr 2, 2015 at 10:00 PM Nikolay Amiantov [email protected] wrote:

It would certainly be nice to remove usage of TH at all, using GHC Generics to derive needed Memoizable instances. However, I haven't looked deep in the code, so I don't know whether this is possible for them.

Reply to this email directly or view it on GitHub https://github.com/tov/memoize/issues/7.

tov avatar Apr 03 '15 02:04 tov