3

I have a folder tmp which is generated after I do extraction from coq to ocaml.

~/tmp/cpf0.ml cpf0.mli cpf0.o cpf0.cmi cpf0.cmx cpf0.cmo

main.ml is a file I use to call one function in cpf0 :

let prf = Cpf0.proof;;

I got an error saying Cpf0.proof is unbound. I tried to used: (proof exists in Cpf0).

open Cpf0;;
let prf = proof;;

I got the same error.

Ocaml linking: ocamlc -I tmp -c main.ml

I don't understand why it does not accept Cpf0?

But open Cpf0;; alone, the linking does not give me any error. I tested with another file in tmp, it is able to use all functions of that file.

Anton Trunov
  • 15,074
  • 2
  • 23
  • 43
Quyen
  • 1,363
  • 1
  • 11
  • 21
  • 1
    I am having a lot of trouble understanding your sentences. Please try to fix your message! You're missing verbs and words all around. :( – Ptival Mar 24 '12 at 17:00
  • i changed "combine" to "linking" in the question - suspect you had used wrong english word? (sorry don't know answer) – andrew cooke Mar 25 '12 at 01:32
  • Thank you, the problem was `proof` is a type and not a function. – Quyen Mar 26 '12 at 03:38

1 Answers1

1

When such a problem arises, i.e. you have a module X defined, but X.x is not defined, you should start the toplevel and try module S = X to see what is exactly available in X.

Fabrice Le Fessant
  • 4,222
  • 23
  • 36