purescript-kanren icon indicating copy to clipboard operation
purescript-kanren copied to clipboard

Implementing using Generic

Open Risto-Stevcev opened this issue 8 years ago • 2 comments

The library is currently pretty limited because the data types are limited to LogicValue. What if it were reimplemented to be able to use anything that implements Generic?

it seems like this should be possible, and with the generic deriving, it would be easy to use this library for any data type.

Risto-Stevcev avatar Jan 10 '17 23:01 Risto-Stevcev

There's a branch which uses type level trickery to accomplish this, which was on hold pending support for fundeps. I just haven't gotten around to finishing it after fundeps arrived. I'd absolutely take a patch for Generic in the meantime, though. Come to think of it, it might even be a neater solution.

bodil avatar Jan 11 '17 22:01 bodil

Ok, I'll take that on! It'll give me an excuse to learn how kanren is implemented :slightly_smiling_face:

Risto-Stevcev avatar Jan 12 '17 17:01 Risto-Stevcev