eliom
eliom copied to clipboard
User types, type variables and eliom sides
In current eliom, we have this definition:
val%server Eliom_parameters.user_type :
?client_to_and_of : 'a to_and_of Eliom_client_value.t ->
of_string : (string -> 'a) ->
to_string : ('a -> string) ->
string ->
('a, [ `WithoutSuffix ], [ `One of 'a ] param_name) params_type
Here, 'a is used both on the client and the server. This is ill-typed, in particular in the new typechecker. I don't intend to ever support that kind of type constraint.
This bug report is here to discuss potential solutions to this.
With converters, the solution would naturally be to expect a converter to have a translation. We can't really do that here.
Another, unsafe, proposition is just to make it a 'b.
Any ideas ?