Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001926OCaml~DO NOT USE (was: OCaml general)public2003-11-12 23:292016-12-06 22:10
Reporteradministrator 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001926: IO module (feature wish)
DescriptionFull_Name: Oleg Trott
Version: N/A
OS: N/A
Submission from: tw304h3.cpmc.columbia.edu (156.111.84.180)


I'm very puzzled why after over 10 years, Caml did not acquire something like
this ("Modern" languages seem to usually have it: Haskell has "read" and
"show", e.g.)

(* =========== module IO ================== *)

module type AnyType = sig type t end

type style = Binary | Caml | S_expr | XML

exception Parse_error
exception Type_error

module type S =
  sig
    type t
    val from_channel: ?style:style -> in_channel -> t
    val from_string : ?style:style -> string -> t
    val from_buffer : ?style:style -> string -> int -> t

    val to_channel: ?style:style -> ?detect_sharing:bool -> out_channel -> t
-> unit
    val to_string: ?style:style -> ?detect_sharing:bool -> t -> string
    val to_buffer: ?style:style -> ?detect_sharing:bool -> t -> string ->
int-> int
  end

module Make (Any : AnyType) : S with type t = Any.t

(* ======================================== *)

No explanation is necessary, I hope. IO module should to be type-safe and
subsume Marshal and IOXML.

This would, of course, require compiler support, since users can not do type
introspection, even with Camlp4.

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0016667)
shinwell (developer)
2016-12-06 22:10

I don't think this request is relevant given the current state of serializers for OCaml.

- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue
2016-12-06 22:10 shinwell Note Added: 0016667
2016-12-06 22:10 shinwell Status acknowledged => closed
2016-12-06 22:10 shinwell Resolution open => won't fix
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker