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
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000235: Probable bug in stream
DescriptionFull_Name: Vladimir Támara
Version: 3.00
OS: GNU/LINUX
Submission from: gateway1-nehmer.informatik.uni-kl.de (131.246.19.252)


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
(0002185)
administrator (administrator)
2000-11-28 10:55

Hi,

On Tue, Nov 28, 2000 at 10:50:17AM +0100, vtamara@gnu.org 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
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/ [^]

(0002186)
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