Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000235OCamlOCaml generalpublic2000-11-28 10:502000-11-28 17:29
Assigned To 
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000235: Probable bug in stream
DescriptionFull_Name: Vladimir Támara
Version: 3.00
Submission from: (

If I define a function to convert a stream of chars to a string like:

let rec string_of_stream str=
  match str with parser
  | [<'c>] -> (String.make 1 c)^(string_of_stream str)
  | [<>] -> ""

The following behavior is correct:

# string_of_stream (Stream.of_string "Hi");;
- : string = "Hi"

But I think the following is not:
 string_of_stream [<Stream.of_string "Hi">];;
Uncaught exception: Failure "illegal stream concatenation".

(I saw with Stream.dump that Stream.of_string generates a Sgen while [<...>]
generates an Slazy, probably Slazy doesn't mix well with Sgen (?)).

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
administrator (administrator)
2000-11-28 10:55


On Tue, Nov 28, 2000 at 10:50:17AM +0100, wrote:

> string_of_stream [<Stream.of_string "Hi">];;
> Uncaught exception: Failure "illegal stream concatenation".

Implementation feature. It's specified in a comment in stream.mli.

Daniel de RAUGLAUDRE [^]

administrator (administrator)
2000-11-28 17:29

Works as documented.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker