caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Kenichi Asai <>
To: Jeremie Dimino <>
Cc: caml users <>
Subject: Re: [Caml-list] a simple example of compiler-libs.toplevel?
Date: Fri, 5 Mar 2021 23:03:34 +0900	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Thanks for the e-mail, Jeremie!

Your example first modifies Toploop.read_interactive_input and then
calls the original Topmain.main.  Because had a hook for
reading interactive input, we could change the character for the

A side question.  How can I find what hooks are available?  By looking
at the source and finding what functions are defined as refs?  (I find
that parse_toplevel_phrase, parse_use_file, and toplevel_startup_hook
are defined as refs in, so they can be replaced?)

What if there is no such hook?  For the type debugger, I want to call
a specific function whenever a type error occurs in the second
execute_phrase (right after "with exn ->") in  But there
is no hook there.  Since the execute_phrase function is not defined as
a ref, I cannot replace it, either.  What can I do then?

Kenichi Asai

  reply	other threads:[~2021-03-05 14:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05  5:05 Kenichi Asai
2021-03-05  9:44 ` Jeremie Dimino
2021-03-05 14:03   ` Kenichi Asai [this message]
2021-03-05 17:11     ` Jeremie Dimino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \
    --subject='Re: [Caml-list] a simple example of compiler-libs.toplevel?' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).