These are features that you might want to implement in addition to the core features.
type::Error
Int
, which can create cascades of errors:
"666" = if 000 then 333 else "666"
File 56: is_devil.tig
$ tc is_devil.tig --types-check error-->is_devil.tig:1.8-33: type mismatch error--> then clause type: int error--> else clause type: string error-->is_devil.tig:1.0-33: type mismatch error--> left operand type: string error--> right operand type: int =>4 Example 57: tc is_devil.tig --types-check
One means to avoid this issue consists in introducing a new type,
type::Error
, that the type checker would never complain about.
This can be a nice complement to ast::Error
.