-- | HIDE only hides it from the documentation, it has no semantic effect.
daml-stdlib doesn’t solve this problem. If you have a RelTime field on a template you can send whatever you want over the ledger API and no validation will take place. That’s what the thread I linked above discusses Should runtime/API respect namespace scopes?.
We do try to make it hard to accidentally construct it manually so directly in Daml you’ll have a hard time (I expect you can bypass the checks if you try hard enough but it’s not trivial):
- The actual type definition is in
DA.Time.Types,DA.Timeonly reexports the type but not the constructor. - The compiler has a hardcoded list of internal modules that you cannot import without getting an error.
-
DA.Time.Typeshas special treatment indata-dependencieswhich means you also cannot directly bypass it that way.