caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Adding functions to Pervasives
@ 2014-01-07 11:46 John Whitington
       [not found] ` <E51C5B015DBD1348A1D85763337FB6D9E0297FE7@Remus.metastack.local>
  0 siblings, 1 reply; 2+ messages in thread
From: John Whitington @ 2014-01-07 11:46 UTC (permalink / raw)
  To: caml-list

Hi,

I'm building a patch for OCaml which requires adding a couple of 
functions to Pervasives.

I have modified stdlib/pervasives.ml(i) and 
otherlibs/threads/pervasives.ml to add these new (pure ocaml) functions.

This builds, but the resulting ocaml toplevel gives

   Fatal error: exception Env.Error()

on startup. This is on a clean checkout, save for my simple changes.

Is there some magic needed when adding something to Pervasives?

Thanks,

-- 
John Whitington
Director, Coherent Graphics Ltd
http://www.coherentpdf.com/


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] Adding functions to Pervasives
       [not found] ` <E51C5B015DBD1348A1D85763337FB6D9E0297FE7@Remus.metastack.local>
@ 2014-01-07 17:25   ` John Whitington
  0 siblings, 0 replies; 2+ messages in thread
From: John Whitington @ 2014-01-07 17:25 UTC (permalink / raw)
  To: caml-list; +Cc: David Allsopp

Hi,

David Allsopp wrote:
> Does your custom OCaml bootstrap? Wondering if the wrong header gets installed - looking at typing/env.ml, your most likely problem is a mismatch between pervasives.cmi and pervasives.cmo

Yes, the new OCaml bootstraps successfully at the first attempt.

I'll have a look at typing/env.ml -- thanks for the suggestion.

> There's also the -nopervasives switch to ocamlopt (it's undocumented, but I think you'll find it does almost exactly what it says on the tin!) which might yield clearer code?

How do you mean? I'm adding functions to Pervasives because I want these 
patches to eventually be applied to trunk (I'm playing with solutions to 
Bug 5443).

I had assumed I was running into a common problem, since functions get 
added to Pervasives from time to time.

For now, I'll add these functions in another module and continue with 
the rest of the patch.

Thanks,

-- 
John Whitington
Director, Coherent Graphics Ltd
http://www.coherentpdf.com/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-07 17:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-07 11:46 [Caml-list] Adding functions to Pervasives John Whitington
     [not found] ` <E51C5B015DBD1348A1D85763337FB6D9E0297FE7@Remus.metastack.local>
2014-01-07 17:25   ` John Whitington

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).