You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working on #43 I noticed that function generating error messages (a.k.a. gripers in typeSugar module) are called several times even though only one error message gets printed. @slindley says this is caused by unification doing backtracking: error messages are generated and thrown as exceptions, they get caught and another attempt at unification is made. It would be much better to generate error messages lazily, ie. only when they are actually going to get printed.
The text was updated successfully, but these errors were encountered:
Unification wrapper in typeSugar is now separated into:
* unification function returning a data type indicating success
or failure
* worker for raising an error
* wrapper around the above two functions that restores previous
behaviour of unify wrapper
* unifyOr combinator that tries to unify first pair of types and if
that fails it tries the second pair, without generating an error
message for the first failed unification
This partially fixes#85. build_tyvar_names is still called too eagerly
to generate variable names that are not getting displayed. Reason
remains to be investigated.
Generate error messages lazily. Fixes#85.
Unification wrapper in typeSugar is now separated into:
* unification function returning a data type indicating success
or failure
* worker for raising an error
* wrapper around the above two functions that restores previous
behaviour of unify wrapper
* unifyOr combinator that tries to unify first pair of types and if
that fails it tries the second pair, without generating an error
message for the first failed unification
When working on #43 I noticed that function generating error messages (a.k.a. gripers in
typeSugar
module) are called several times even though only one error message gets printed. @slindley says this is caused by unification doing backtracking: error messages are generated and thrown as exceptions, they get caught and another attempt at unification is made. It would be much better to generate error messages lazily, ie. only when they are actually going to get printed.The text was updated successfully, but these errors were encountered: