Open c3d opened 4 years ago
Implement type expressions as documented.
The most important types are:
T1 or T2
T or error
mayfail T
T1 and T2
number and ordered
not T
ln X:not positive is error "Log of negative"
Internally, the compiler currently generates very basic union types using the | operator.
|
Ideally, we would be able to implement all this in the library only, once the type interface (issue #11) is properly defined. For example:
type T1 or T2 is contains Value is T1.contains Value or T2.contains Value
Implement type expressions as documented.
The most important types are:
T1 or T2
, e.g. forT or error
(akamayfail T
)T1 and T2
, mostly for traits, e.g.number and ordered
not T
, mostly for rules that exclude a given set of type, e.g.ln X:not positive is error "Log of negative"
Internally, the compiler currently generates very basic union types using the
|
operator.Ideally, we would be able to implement all this in the library only, once the type interface (issue #11) is properly defined. For example: