Debian Codegraph @

test-suite/bugs/bug_7986.v

raw
1 Inductive Instruction: Set := .
2
3 (* The following works: *)
4 Notation "'RISCV' {{ x ; y ; .. ; z }}" := (@cons Instruction x
5 (@cons Instruction y .. (@cons Instruction z nil) ..))
6 (format "'RISCV' {{ '[v' '//' x ; '//' y ; '//' .. ; '//' z ']' '//' }}").
7
8 (* But if I remove the semicolons, I get
9 Error: Anomaly "Uncaught exception Failure("List.last")."
10 Please report at http://coq.inria.fr/bugs/.
11 *)
12 (* This should fail as: "The format does not match the notation." *)
13 Fail Notation "'RISCV' {{ x y .. z }}" := (@cons Instruction x
14 (@cons Instruction y .. (@cons Instruction z nil) ..))
15 (format "'RISCV' {{ '[v' '//' x '//' y '//' .. '//' z ']' '//' }}").