The following code appears in coq-parsec/test
From Parsec Require Import
Core.
From Coq Require Import
String.
(* From parsec/tests/Chunk.v *)
Definition parseLastChunk : parser unit :=
many1 (expect "0"%char);;
parseCRLF.
Definition parseChunk : parser string :=
n <- guard (negb ∘ Nat.eqb O) (N.to_nat <$> parseHex);;
parseCRLF;;
cs <- manyN n anyToken;;
parseCRLF;;
ret (string_of_list_ascii cs).
Locally, it compiles all the way until the definition of parseChunk
, at which point it returns Error: The reference guard was not found in the current environment.
.
I believe the minimal replicator is
From Parsec Require Import Core.
Check guard.
I tried From Parsec Require Import Core Parser.
, which didn't help.
I think you are going to need to ping the author of parsec for this @Yishuai Li
Hi,
I cannot reproduce the error on my side. Which version of Coq and Parsec are you using?
I see. guard
was introduced after release v0.1.0. I'll release a new version now.
what's in nixpkgs
, and I don't have a particular commit of nixpkgs
pinned so I think that means it's pulling in the latest one
Also, the latest commit to the coq-modules/parsec/default.nix
file was september while the latest commit to the library was before that.
I believe Nix uses stable versions rather than branches, so I should first release a version, and then figure out how to inform Nix of the change.
Quinn said:
what's in
nixpkgs
, and I don't have a particular commit ofnixpkgs
pinned so I think that means it's pulling in the latest oneAlso, the latest commit to the
coq-modules/parsec/default.nix
file was september while the latest commit to the library was before that.
It depends on how you've set things up, but more likely, if you haven't pinned nixpkgs for your specific Coq project, you are just using the version that is set in your system (and it likely doesn't auto-update without action from your part).
Yishuai Li said:
I believe Nix uses stable versions rather than branches, so I should first release a version, and then figure out how to inform Nix of the change.
That's correct. I can take care of doing the nixpkgs update if you want.
(but please create opam package too)
https://github.com/coq/opam-coq-archive/pull/2092
Last updated: Oct 13 2024 at 01:02 UTC