Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coq export: use Require Export instead of Require Import #1157

Merged
merged 3 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ In symbol declarations or definitions, parameters with no type are assumed to be

It instructs Lambdapi to replace any occurrence of the unqualified identifier ``lp_id`` by ``coq_expr``, which can be any Coq expression. Example: `renaming.lp <https://github.com/Deducteam/lambdapi/blob/master/libraries/renaming.lp>`__.

* ``--requiring <COQ_FILE>`` to add ``Require Import <COQ_FILE>`` at the beginning of the output. ``<COQ_FILE>`` usually needs to contain at least the following definitions:
* ``--requiring <MODNAME>`` to add ``Require Import <MODNAME>`` at the beginning of the output. ``<MODNAME>.v`` usually needs to contain at least the following definitions:

::

Expand Down
4 changes: 1 addition & 3 deletions src/export/coq.ml
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,7 @@ let set_requiring : string -> unit = fun f -> require := Some f
let print : ast -> unit = fun s ->
let oc = stdout in
begin match !require with
| Some f ->
string oc "Require Import ";
string oc (Filename.chop_extension f); string oc ".\n"
| Some f -> string oc ("Require Export "^f^".\n")
| None -> ()
end;
ast oc s
Loading