0

When I execute the following commands within the CoqIDE:

Extraction Language Haskell.
Extraction "Code.hs" my_function.

I get the following error:

System error: "Code.hs: Permission denied"

If I try instead:

Extraction Language Haskell.
Extraction "~/Code.hs"  example10.

I get the error:

System error: "~/Code.hs: No such file or directory"

I'm using the CoqIDE 8.5beta3 for MacOSX.

How can I fix this? How can I do extraction through the CoqIDE without having permission issues?

Anton Trunov
  • 15,074
  • 2
  • 23
  • 43
Bruno
  • 854
  • 7
  • 21

1 Answers1

1

You are probably trying to write to a directory to which you don't have write permission, so it is not a Coq error, but an error from your operating system.

The second reason is probably that Coq does not expand the ~ to your home directory. It is a bashism, not an OS thing. Write /Users/yourname/ instead.

larsr
  • 5,447
  • 19
  • 38
  • I tried with `/User/myname/` instead of `~`, and the problem is the same. Do you have any other ideas, @larsr ? – Bruno Dec 19 '15 at 21:38
  • Oh, yes. It worked now. I just wonder why the extraction mechanism in Coq(IDE) forces us to specify an absolute path to the file where the extracted code should be saved. I wish that, by default, it simply saved the extracted code in the same directory of the ".v" file. – Bruno Dec 20 '15 at 05:05