[m-rev.] for review: Document what whitespace means to library predicates.
Julien Fischer
jfischer at opturion.com
Mon Oct 2 17:02:21 AEDT 2017
Hi Peter,
On Mon, 2 Oct 2017, Peter Wang wrote:
> diff --git a/library/char.m b/library/char.m
> index b402784c5..9900ad5cc 100644
> --- a/library/char.m
> +++ b/library/char.m
> @@ -118,8 +118,14 @@
> %
> :- pred is_ascii(char::in) is semidet.
>
> - % True iff the character is a whitespace character in the ASCII range,
> - % i.e. a space, tab, newline, carriage return, form-feed, or vertical tab.
> + % True iff the character is a whitespace character in the ASCII range:
> + %
> + % U+0020 space
> + % U+0009 tab
> + % U+000A line feed
> + % U+000B vertical tab
> + % U+000C form feed
> + % U+000D carriage return
> %
> :- pred is_whitespace(char::in) is semidet.
I would give both the Unicode name and the ASCII name where the two
differ, so:
U+0020 space
U+0009 character tabulation (horizontal tab)
U+000A line feed
U+000B line tabulation (vertical tab)
U+000C form feed
U+000D carriage return
Julien.
More information about the reviews
mailing list