A wide use of opaque types introduces a new unexpected problem: how to convert them to String. From JVM prospective opaques do not exist. Simple
.toString() conversion will always be done for the base type.
For example, the following outputs are not very informative, as they represent
val t : Time = CURRENT val tl: Time.Length = 12.Seconds println(t) // Prints: 1603916378729 println(tl) // Prints: 12000000000
In Scalqa, instead of
.toString() one has to always use method
.tag, which is universally available for all types including opaques.
println(t.tag) // Prints: 2020-10-28 16:23:08.888 println(tl.tag) // Prints: 12 secs
t.tp // Prints: 2020-10-28 16:23:08.888 tl.tp // Prints: 12 secs
.tp must not appear in production code, its presence indicates leftover debugging functionality.
.tp is also widely used in examples, so prepare to see a lot of it in this documentation.