:- module bug.
:- interface.

:- import_module list.
:- import_module codepoint.

:- type range
    --->    range(unicode).

:- pred parse(list(unicode), list(unicode), list(range)).
:- mode parse(in, out, out) is semidet.

:- implementation.

parse(Us0, Us, Res) :-
    parse_range(Us0, Us, Range),
    Res = [Range].

:- pred parse_range(list(unicode), list(unicode), range).
:- mode parse_range(in, out, out) is semidet.

parse_range(Us0, Us, Range) :-
    Us0 = [unicode(0x2d) | Us],
    Range = dash.

:- func dash = range.
%:- pragma no_inline(dash/0).

dash = range(unicode(0x2d)).
