gen (v4)Tolerating type errors
There are scenarios where one can get a bit stuck, however. For example, if you generate incorrect code, your codebase is now incorrect – which will cause gen to refuse to generate new code! (Most users won’t experience this, but if you are authoring your own typewriter, it will sound familiar.) There are classes of errors that gen can tolerate while maintaining correctness. For example:
Here, the code is syntactically valid and the Under normal circumstances, gen will stop in the presence of any type error such as the one above. One can imagine that gen should logically be able to operate here, since it only cares about The solution to this is the Officially gen considers “force” mode to be unspecified behavior. There are many classes of errors and we can’t guarantee the correct behavior under all circumstances. However, for certain classes of type-check errors, Here’s a bit of background discussion. |