Typed.Bool contains
|
let[@inline] symbol x = Expr.symbol x |
Not only does it not check the symbol type at compile time, it also doesn't check at runtime!
So Smtml is completely happy with
Typed.Bool.symbol (Symbol.make Ty_int "x")
This defeats the point of the Typed interface because all the safety it provides can be just bypassed.
These inner symbol functions should at least check the types at runtime.
And if this check is unnecessarily expensive for some use case, I guess there could be Typed.Unsafe.Bool.symbol with the current unchecked definition.
Typed.Bool containssmtml/src/smtml/typed.ml
Line 461 in f50d5bf
Not only does it not check the symbol type at compile time, it also doesn't check at runtime!
So Smtml is completely happy with
This defeats the point of the
Typedinterface because all the safety it provides can be just bypassed.These inner
symbolfunctions should at least check the types at runtime.And if this check is unnecessarily expensive for some use case, I guess there could be
Typed.Unsafe.Bool.symbolwith the current unchecked definition.