Open ibb-dinosaur opened 1 month ago
My default answer would be that missing implementations are probably due to just not having stumbled across a need. I haven't attempted to apply this library to many real world problems, as it kind of exploded beyond my initial use case into a beast of its own. So the ergonomics are definitely uneven at best.
I haven't thought too deeply about your examples (or about canrun generally in a while), but most of them seem reasonable. I am not sure about the last two.
Ord, PartialOrd for LVar
: what would the use case be for ordering these? I think the only option would be to use the internal .id, but that feels like an undesirable leak of an implementation detail. This goes even more obviously for the into/from_raw
functions.
That said, if you have a use case I don't think I mind adding them too much (probably both as unsafe). This is mostly an experimental library after all!
Also feel free to throw me a PR for any of this if you're still around/interested. It might be a bit before I have time to do it myself.
Hello, I am trying to use this implementation of miniKanren in Rust (which I think is the best one and very well documented) and I just noticed that some types don't implement certain traits. I have very little logic programming (and *Kanren) skills, so I'm not sure if there's a reason why these traits are not implemented, but they make working with the types a little harder.
Unify
forValue<T>
Eq
forLVar<T>
without theT: Eq
constraintClone
forLVec
PartialEq, Eq
forLVec
Ord, PartialOrd
forLVar
(also I think it would be helpful to add two functions likefn into_raw() -> usize
andunsafe fn from_raw(n: usize)
, but I understand why it doesn't exist)