caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: John Carr <jfc@mit.edu>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] Strange crash after switching to first class modules
Date: Thu, 29 Sep 2011 18:35:16 +0200	[thread overview]
Message-ID: <4E849E44.3050002@inria.fr> (raw)
In-Reply-To: <201109291603.p8TG3FBX006930@outgoing.mit.edu>

On 09/29/2011 06:03 PM, John Carr wrote:

> One sentence summary: I added a local module generated by
> functor application to an unpacked first class module and
> the runtime blew up. [...]
> The last active code in my source is a function that looks like this
> in relevant part:
> 
> 	let format chan x =
> 	  let f = Printf.fprintf chan "%s %d" in
> 	    begin match x with
> 	      | W (n,false) -> f "string" n
> 	    end
> 
> Note the partial application of fprintf.

Could you first try to eliminate that partial application of fprintf?
(Inline f at point of call, or eta-expand yourself.)  The Printf
module takes a lot of liberties with the type system (ahem), so it is
one of the usual suspects in such a case.

- Xavier Leroy

  reply	other threads:[~2011-09-29 16:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-29 16:03 John Carr
2011-09-29 16:35 ` Xavier Leroy [this message]
2011-09-29 17:03   ` John Carr

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=4E849E44.3050002@inria.fr \
    --to=xavier.leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=jfc@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).