ta0kira / zeolite

Zeolite is a statically-typed, general-purpose programming language.
Apache License 2.0
18 stars 0 forks source link

"No choices found" error is unclear out of context. #59

Closed ta0kira closed 4 years ago

ta0kira commented 4 years ago

In some situations, type-conversion failures yield the No choices found compiler error. Even though there always seems to be code context, the error is unclear.

This is the error message from collectOneOrErrorM and mergeAnyM, which probably means that the error occurs when attempting to convert a parameter, since those are used when seeing if any filters allow the conversion.

One solution here is to find out where this is happening and use reviseError to add info about the conversion being attempted.

Another solution is to prepend a compileError explaining what's being done, since collectOneOrErrorM and mergeAnyM will both enumerate everything that was tried. This will eliminate No choices found from showing up in the first place.