View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0000533 | mercury | Bug | public | 2021-05-16 22:06 | 2021-08-31 20:49 | ||||
Reporter | pr1 | ||||||||
Assigned To | zs | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | Mercury Compiler, version 20.06. | OS | Macosx | OS Version | 11.3.1 | ||||
Product Version | |||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0000533: Missing streams.int module | ||||||||
Description | A "streams.int missing" message appears when you compile the below code. | ||||||||
Steps To Reproduce | Compile the following code (source: Rosetta Code Website): :- func dr(string) = string. dr(Name) = Titled :- some [!SB] ( !:SB = string.builder.init, put_char(handle, 'D', !SB), put_char(handle, 'r', !SB), format(handle, " %s", [s(Name)], !SB), Titled = to_string(!.SB) ). main(!IO) :- io.format("%s\n", [s(dr("chien"))], !IO) . | ||||||||
Tags | No tags attached. | ||||||||
Attached Files |
Notes | |
juliensf (administrator) 2021-05-16 23:03 |
We will require more information than that in order to reproduce the issue. 1. The complete program, including all the module import declaration etc. (You say it is sourced from Rosetta coda -- which program on that site is it?) 2. What exactly was the command you used to try and compile it? |
pr1 (reporter) 2021-05-16 23:19 |
Rosetta Code sample here: http://www.rosettacode.org/wiki/Variables#Mercury Please search for "func dr(string" Error Message I get: p@XXX existential_types % mmc exist3.m mercury_compile: cannot find `streams.int' in directories ., /usr/local/Cellar/mercury/20.06.1/lib/mercury/ints p@XXX existential_types % |
pr1 (reporter) 2021-05-16 23:20 |
Mercury Compiler, version 20.06.1, on x86_64-apple-darwin20.3.0 Copyright (C) 1993-2012 The University of Melbourne Copyright (C) 2013-2020 The Mercury team Usage: mmc [<options>] <arguments> Use `mmc --help' for more information. |
zs (developer) 2021-05-16 23:24 |
That still does not give us THE CODE OF THE PROGRAM YOU ARE TRYING TO COMPILE. |
pr1 (reporter) 2021-05-16 23:37 |
I added it as an attachment, though. Here it is: :- module exist3. :- interface. :- import_module io. :- pred main(io::di, io::uo) is det. :- implementation. :- import_module char. :- import_module list. % to_char :- import_module streams. :- import_module string. :- import_module string.builder. :- import_module int. :- func dr(string) = string. dr(Name) = Titled :- some [!SB] ( !:SB = string.builder.init, put_char(handle, 'D', !SB), put_char(handle, 'r', !SB), format(handle, " %s", [s(Name)], !SB), Titled = to_string(!.SB) ). main(!IO) :- io.format("%s\n", [s(dr("chien"))], !IO) . |
zs (developer) 2021-05-17 00:07 |
Sorry, I didn't see that. The automated email sent by Mantis did not include it. |
juliensf (administrator) 2021-05-17 13:59 |
The message is accurate, there is no "streams" module; the one you want is called "stream". You also need to import the module "stream.string_writer" for this code to work. |
zs (developer) 2021-08-31 20:49 |
The attached bug533.m source file compiles and runs cleanly, proving that Julien's diagnosis was correct. The bug is in exist3.m, not in the Mercury system. |
Issue History | |||
Date Modified | Username | Field | Change |
---|---|---|---|
2021-05-16 22:06 | pr1 | New Issue | |
2021-05-16 23:03 | juliensf | Note Added: 0001141 | |
2021-05-16 23:19 | pr1 | File Added: exist3.m | |
2021-05-16 23:19 | pr1 | Note Added: 0001142 | |
2021-05-16 23:20 | pr1 | Note Added: 0001143 | |
2021-05-16 23:24 | zs | Note Added: 0001144 | |
2021-05-16 23:37 | pr1 | Note Added: 0001145 | |
2021-05-17 00:07 | zs | Note Added: 0001146 | |
2021-05-17 13:59 | juliensf | Note Added: 0001147 | |
2021-08-31 20:47 | zs | File Added: bug533.m | |
2021-08-31 20:49 | zs | Assigned To | => zs |
2021-08-31 20:49 | zs | Status | new => closed |
2021-08-31 20:49 | zs | Resolution | open => fixed |
2021-08-31 20:49 | zs | Note Added: 0001150 |