Improve the error message with invalid strings

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-06-04 22:01:51 +07:00
parent 8351fcb466
commit 731b61b0b9
1 changed files with 3 additions and 2 deletions

View File

@ -134,8 +134,9 @@ module Expand_to(V: EXPANSION) = struct
let check_valid_multivalue syntax ~var t ctx =
if not t.quoted && V.is_multivalued ctx then
Loc.fail t.loc "please quote the string \
containing the list variable %s"
Loc.fail t.loc "Variable %s expands to multiple values, \
however a single value is expected here. \
Please quote this atom. "
(string_of_var syntax var)
let expand ctx t ~f =