Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Dynamic loading of bytecode
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Tom <tom.primozic@g...>
Subject: Dynamic loading of bytecode
There is a really stupid question I want to ask, I have been searching
online for some days now and couldn't get it answered...

How can you load the whole module hiearchy (many modules, dependent on one
another) with a single command in toploop?

Say I have files

  let f x = x - 1


  let g x y = x + f y - f x

and I compile them into bytecode

  ocamlc -c
  ocamlc -c

and then I want to be able to load them into the toploop so that I could
access both modules A and B:

  # let simplify x = B.g x - A.f x

How do I do that?