I often have manipulation that return a value, that I will both use in a single manipulateParams call, or sometimes in batch with traversePrepared - in this latter case, I very frequently do not want the result and void it. This used to work fine in squeal 0.5, but it is my understanding that the new mechanisms at play in Squeal 0.6 make this a bit harder, as the compiler still tries to infer the voided type and fail unless I give it very explicitly.
It is however very convenient to be able to write:
void . traversePrepared -- .. statement and params
Sadly, I cannot use traversePrepared as it demands a statement that returns nothing - which makes sense.
So would it be possible to add a function voidStatement with a signature like this one:
-> Manipulation with db params ()
This way we could write:
traversePrepared . voidStatement -- .. statement and params
Unless there is a way of making traversePrepared_ work with manipulations that have a return type other than () ? (But it might not be a good idea either, as it is rather a good thing to have some type safety at this specific spot).
Obviously, this can still be worked around by stating the expected types explicitly, then voiding them, but it might be a nice convenience to add. What do you think ?
I often have manipulation that return a value, that I will both use in a single
manipulateParamscall, or sometimes in batch withtraversePrepared- in this latter case, I very frequently do not want the result andvoidit. This used to work fine in squeal 0.5, but it is my understanding that the new mechanisms at play in Squeal 0.6 make this a bit harder, as the compiler still tries to infer the voided type and fail unless I give it very explicitly.It is however very convenient to be able to write:
void . traversePrepared -- .. statement and paramsSadly, I cannot use
traversePreparedas it demands a statement that returns nothing - which makes sense.So would it be possible to add a function
voidStatementwith a signature like this one:This way we could write:
Unless there is a way of making
traversePrepared_work with manipulations that have a return type other than()? (But it might not be a good idea either, as it is rather a good thing to have some type safety at this specific spot).Obviously, this can still be worked around by stating the expected types explicitly, then voiding them, but it might be a nice convenience to add. What do you think ?