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

camldebug + install_printer #7962

Closed
vicuna opened this issue Nov 30, 2002 · 1 comment
Closed

camldebug + install_printer #7962

vicuna opened this issue Nov 30, 2002 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Nov 30, 2002

Original bug ID: 1487
Reporter: administrator
Status: acknowledged
Resolution: open
Priority: normal
Severity: feature
Category: tools (ocaml{lex,yacc,dep,debug,...})

Bug description

avec ocaml 3.06 cygwin+
camldebug sous emacs(21.1.1) +
des printers speciaux pour mes types,
j'ai un probleme.

Je declare des types dans un fichier f1.ml, je les utilise dans des
fonctions, certaines de f1.ml, d'autres de f2.ml. Je cree et installe les
printers correspondants dans camldebug. Ils fonctionnent tres bien dans le
fichier ou ne sont pas declares les types, mais ne fonctionnent pas dans
f1.ml.

Exemple:

f1.ml: ------------------------------

type foo = { foo_content: string; }

let bar foo =
  foo.foo_content^foo.foo_content

f2.ml: ------------------------------

let gnat foo =
  String.uppercase foo.F1.foo_content

let _ =
  let foo = {F1.foo_content="foo"} in
  print_string (gnat foo);
  print_newline ();
  print_string (F1.bar foo);
  print_newline ()

printer.ml: -------------------------

open Format
let foo fmt foo = print_string ("<<"^foo.F1.foo_content^">>");
$ ocamlc -g -o test f1.ml f2.ml
$ ocamlc -c printer.ml

M-x camldebug test
(ocd) load_printer "printer.cmo"
(ocd) install_printer Printer.foo

si je fais "print foo" dans F2.gnat, j'obtiens bien:

(ocd) print foo
foo : F1.foo = <<foo>>

Par contre, dans F1.bar, j'obtiens:

(ocd) print foo
foo : foo = {foo_content = "foo"}
@github-actions
Copy link

github-actions bot commented May 6, 2020

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label May 6, 2020
@github-actions github-actions bot closed this as completed Jun 5, 2020
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

2 participants