Refer.SeqFunctions to generate lazy sequences of refer records.
(of_lines seq) converts a sequence of strings (representing lines) to a sequence of Refer records.
Common sources of string sequences include String.seq_of_lines and lines_of_chan.
Each record is a result: Ok for valid records, Error for syntax errors.
The Ok case is a pair (int * t) where the int is the line number of the first line of the record.
The Error case is a pair (int * t) where the int is the line number of the syntax error.