[m-dev.] more things to move from io.m.

Zoltan Somogyi zoltan.somogyi at runbox.com
Tue Mar 15 01:13:41 AEDT 2022


2022-03-14 18:52 GMT+11:00 "Julien Fischer" <jfischer at opturion.com>:
> 
> On Mon, 14 Mar 2022, Zoltan Somogyi wrote:
> 
>> io.m is now down to 6700 lines (from more than 13k originally).
>> Nevertheless, there are more things we can move from it to other places.
>>
>> One is the predicates flush_output_2 and flush_binary_output_2.
>> We could move these to either io.stream_ops, io.primitives_write,
>> or to a new submodule that writes out non-primitive items. I think
>> stream_ops is the right place.
> 
> stream_ops seems fine.
> 
>> Another is the implementations of read_word, read_line, read_file
>> and their variants. I think these can be moved to a new submodule
>> (leaving the top-level predicates in io.m); the main question is what this
>> new submodule should be named. These are the only non-primitive things
>> io.m reads that take up any space in io.m itself. Reading terms is done by
>> mercury_term_parser.m; reading bitmaps is now done by bitmap.m.
>> How about io.read_text.m, or io.text_read.m to fit in with io.primitives_read.m?
> 
> io.text_read seems fine.

The attached diff implements both of these. Since the concept has been
agreed and the implementation is straightforward, there is no need
for a review.

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.fltr
Type: application/octet-stream
Size: 1060 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/developers/attachments/20220315/03c5537a/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.fltr
Type: application/octet-stream
Size: 66459 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/developers/attachments/20220315/03c5537a/attachment-0003.obj>


More information about the developers mailing list