Žiga Leber

Results 4 comments of Žiga Leber

Meh, I think I figured it out, ```Set.Make(Label).pp``` is then called in the body of the generated function, right? So the generator could do ```let module S = Set.Make(Label) in...

I later realized you could do: ```ocaml type phantom = P [@@deriving eq, ord, show] type 'a t = Thing [@@deriving eq, ord, show] type usage = phantom t [@@deriving...

This doesn't work if you use this type inside another type and want to derive ```eq``` again. ```ocaml type phantom = P [@@deriving eq] type 'a t = Thing [@@deriving...

Couldn't you examine the type, to tell if the type parameters are phantom? I guess that wouldn't work if the type was abstract, though (maybe if you could somehow tag...