I am currently implementing
type t
val null : t
val isNull : t -> bool
where type t = CInterface.vol. There is no problem doing this but I
wondered whether I could improve the CInterface structure to avoid
annoying little C library functions.
Would it be at all controversial to include
null : vol
in CInterface?
Regarding comparison of vols, it makes sense that vol is not an eqtype
because it stores more than just the "raw vol". Generally, is it safe
to compare vols using their "raw vols"? I.e. could garbage collection
or data sharing cause the raw vols to become invalid? Even if the raw
vols were valid but changed behind the scenes, such comparisons may be
of dubious value if the result could change due to garbage collection or
data sharing.
If vol comparison is reliable, would it be useful to have an eq or
compare function in CInterface? Otherwise, could CInterface include
isNull : vol -> bool
?
I am happy to have a go at a patch is this sounds useful.
Phil