Closed maxitg closed 3 years ago
I think there is a problem though. If the type system is generic, what do we do with TypeConvert
? Surely, it is almost guaranteed to cause namespace collisions. And using packages without adding them to $ContextPath
is horribly broken in WL at the moment.
I renamed TypeConvert
-> SetReplaceTypeConvert
. This has no possibility of collisions, and I think is more user-friendly than SetReplace`PackageScope`TypeConvert
.
Changes
Comments
Multihistory
, however, theMultihistory
itself is not yet implemented.SetReplaceTypeConvert
, while implemented, cannot be used for anything.Examples
Examples below do not work directly because they use fake types. In order to try them out, do something like
and then evaluate the definitions (line 15 to 68) from
typeSystem.wlt
.If you do that and then evaluate
you will get a type graph from the test file:
You will also be able to do things like these. Here,
"EvenInteger"
type is converted to"HalfInteger"
:Here,
multipliedHalf
property is used on a"HalfInteger"
directly:Here,
"HalfInteger"
is automatically converted to an"EvenInteger"
, and thendescription
property is called.And here,
"EvenInteger"
is converted to"HalfInteger"
first:This change is