Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#install_printer #8334

Closed
vicuna opened this issue Oct 23, 2003 · 3 comments
Closed

#install_printer #8334

vicuna opened this issue Oct 23, 2003 · 3 comments

Comments

@vicuna
Copy link

vicuna commented Oct 23, 2003

Original bug ID: 1891
Reporter: administrator
Status: closed (set by @xavierleroy on 2013-08-31T10:46:14Z)
Resolution: suspended
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Winfried Dreckmann
Version: 3.07-1
OS: Linux PowerPC
Submission from: t3o902p168.telia.com (81.225.156.168)

(1) The #install_printer directive does not recognize modules created in the
toplevel, for instance:

module Test = struct

  let my_printer f x = Format.fprintf f "%x" x
end;;

module Test : sig val my_printer : Format.formatter -> int -> unit end

Test.my_printer;;

  • : Format.formatter -> int -> unit =

#install_printer Test.my_printer;;

Reference to undefined global `Test'

I remember that this worked in earlier versions of OCaml.

(2) The #install_printer directive also causes trouble if applied to C
externals. The following happens with a function "Printtest.my_printer" written
in C and
used in a customized toplevel:

#install_printer Printtest.my_printer;;

"abcde";;

Speicherzugriffsfehler

The C function in this example simply calls "Format.pp_print_string". I am not
sure if C externals are allowed to be printers. I send details if necessary.

Regards,
Winfried Dreckmann

@vicuna
Copy link
Author

vicuna commented Feb 15, 2004

Comment author: administrator

(1) fixed 2004-02-15 by XL.
(2) it's true that #install_printer currently doesn't support printers that are
declared "external". This doesn't seem too limiting in practice, so I'll leave
it as feature wish rather than as a bug. -XL

@vicuna
Copy link
Author

vicuna commented Jan 27, 2012

Comment author: @damiendoligez

There doesn't seem to be much demand for this feature, but if someone provides a good patch, we are willing to consider including it.

@vicuna
Copy link
Author

vicuna commented Jan 27, 2012

Comment author: @lefessan

(1) is already fixed.
(2) would need to be tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant