FStarLang / fstar-mode.el

Emacs support for F*
Apache License 2.0
67 stars 17 forks source link

Printing the goal fails if it has percent signs #74

Closed tchajed closed 7 years ago

tchajed commented 7 years ago

Looks like fstar-tactics--insert-goal doesn't escape the goal, directly using it as a format string. Evaluating the following results in the goal not being printed and an error "apply: Not enough arguments for format string".

module Percent_goal

open FStar.Tactics

let op_Percent = op_Addition

let foo () : Lemma True =
  assert_by_tactic (1%1 == 2) (dump "")
tchajed commented 7 years ago

Credit goes to @nickgian for finding this and identifying format strings as the problem.

cpitclaudel commented 7 years ago

Thanks. How silly.

cpitclaudel commented 7 years ago

I've pushed a slightly safer fix, too.