5

I installed Coq with opam and want to make a Coq plugin. I managed to compile some plugin examples using coq_makefile, but it would be great if I could use merlin in vim for type information and completion for Coq libraries.

Is there a way in which I can add the Coq libraries to ocamlfind?

Richard-Degenne
  • 2,892
  • 2
  • 26
  • 43
Nico Lehmann
  • 177
  • 6
  • I really don't know much about plug-in or merlin, but I know some people on the coq-club mailing list are playing with these packaging methods at the moment. I don't think they often come to SO, so I think you should ask your question on the mailing list also. – Vinz Apr 14 '15 at 07:05
  • Thanks for the suggestion. I contacted some peple that use merlin in some respos for Coq plugins but I think is a good idea to ask in the mailing list as well. – Nico Lehmann Apr 14 '15 at 13:52

3 Answers3

4

coq_makefile will now generate a .merlin for you. Just type

make .merlin
daejk
  • 56
  • 1
3

Finally I answered myself. It was onlly necesary to put the directories of the cmi files of coq in the .merlin file with the directive B

B path/to/coq/kernel
B path/to/coq/library
...
D. Ben Knoble
  • 4,273
  • 1
  • 20
  • 38
Nico Lehmann
  • 177
  • 6
0

I could not figure out how to properly use coq_makefile to do this and @Nico Lehmann answer didn't work for me.

My .merlin file is:

FLG -rectypes
S /usr/lib/coq/**
B /usr/lib/coq/**

where the first line is important(I have no clue what it means). Of course, change /usr/lib/ to the path where your coq is. You can find the coq location by running coqc -where in the command line.

tom
  • 1,520
  • 1
  • 12
  • 26