Search code examples
ocamlopam

how to load rope: installed it, but failing to load it


I installed rope with opam and verified that it's available:

rope 0.5 Ropes ("heavyweight strings")

But how to load it?? The documentation states I should use #load "rope.cma";; but this gives me the message Cannot find file rope.cma.

Can someone please tell me what's the incantation for loading it??


Solution

  • To load rope into interactive session use topfind

    # #use "topfind";;
    # #require "rope";;
    

    To compile your programs with rope

    ocamlbuild -pkg rope your_program.native
    

    or alternatively

    ocamlfind ocamlopt -package rope your_program.ml -o your_program