Closed agarwal closed 8 years ago
I implemented compare
, but I think using Comparable.Make
is not possible due to type parameter in Path.t
. Only possibility would be to provide the four variants, should I do it?
Four variants isn't ideal. Let's hold on this.
Let's decide to not call Comparable.Make. Users can call themselves for now in the cases they need it. So closing this issue.
I can't remember if this was previously discussed, but our current
normalize
doesn't normalize link targets. I feel like it should. The benefits would be:equal
would be simplified. We could simply callPervasives.equal
after normalizing the two paths. Thus, we could deleteequal_normalized
andequal_item
, which right now do nothing more thanPervasives.equal
except for recursively normalizing link targets.compare
, which we currently lack and thus cannot easily applyComparable.Make
.On a related note, we should avoid the wildcard pattern in
equal_normalized
. It would be only 1 more line of code to be explicit.Once this is done, we should
include Comparable.Make
.