Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] ML top level not working for me

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] ML top level not working for me


chronological Thread 
  • From: Stéphane Glondu <steph AT glondu.net>
  • To: Beta Ziliani <beta AT mpi-sws.org>
  • Cc: Coq Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] ML top level not working for me
  • Date: Fri, 30 Dec 2011 13:36:08 +0100
  • Openpgp: id=49881AD3

Le 28/12/2011 10:27, Beta Ziliani a Ã©crit :
> I'm having problems with the ML top level: I cannot do anything useful
> (not even go back to Coq).
> [...]
> # go();;
> Error: Unbound value go
> 
> It seems like it's not loading any Coq source but I don't see what I'm
> doing wrong. [...]

You have to issue "#directory" directives first:

  #directory "/usr/lib/coq/interp";;
  #directory "/usr/lib/coq/kernel";;
  #directory "/usr/lib/coq/lib";;
  #directory "/usr/lib/coq/library";;
  etc.

one for each directory containing the .cmi file of a module you want to
access (adapt /usr/lib/coq/ accordingly). With zsh, you can generate a
"directories" file with the following command:

for u in $COQROOT/**/*.cmi; do echo '#directory "'"${u%/*}"'";;'; done |
sort -u > directories

Then, you can run '#use "directories";;' before running commands from
e.g. dev/include.

It seems that #directory are implicit for each "-I" given when linking
coqtop.byte, which may explain why you don't have to run them when the
source tree is still there.


Cheers,

-- 
Stéphane





Archive powered by MhonArc 2.6.16.

Top of Page