Search code examples
linuxcoqcoqide

CoqIDE configuration in Linux


I have a fresh install of Coq 8.6 in Ubuntu 17.04. When I try to compile my project using make, it works fine until I get the first error message. Then, I try to use CoqIDE to locate and correct the error, but I get new error messages, such as:

"The file foo.vo contains library Top.foo and not library foo"

My guess is that something is wrong with the configuration of CoqIDE, but I do not know what that could be. Any hints?

Thanks in advance, Marcus.


Solution

  • I guess that you are now standing in the directory with the file foo.vo

    To map the files in the current dir . into the namespace Top you give the argument

    -Q . Top
    

    Here is a "complete" example.

    mkdir test; cd test
    echo 'Definition a:=1.' > foo.v
    
    coqc -Q . Top foo.v    # this puts the foo module into Top as Top.foo.
    
    coqtop -Q . Top
    
    Coq <  Require Import Top.foo. Print a.
    
    a = 1
         : nat
    

    but using coqtop without mapping the .vo to the namespace into which it was compiled fails:

    coqtop
    
    Coq <  Require foo.
    
    > Require foo.
    > ^^^^^^^^^^^^
    Error: The file /.../test/foo.vo contains library Top.foo
    and not library foo