Closed parno closed 6 years ago
Good idea. "admit" et al should already be displayed in a different font, but I've just made that font customizable (M-x customize-face fstar-risky-face
). Should we make it look scarier by default, too?
Hmm, I just updated my fstar-mode, and assume
seems to be about the same font as assert
(maybe slightly more purple?). Before I upgraded, admit
wasn't anything special, but I may have missed some intermediate updates to fstar-mode. Now it shows up as red. For my friend's sake, I'd be inclined to make the default a bit larger and scarier, but I -- I mean my friend -- can at least use the new config option. Thanks for adding it!
Good point, thanks. assume
is a special case because of assume val …
. How should that be highlighted?
I would treat assume
the same way admit
is. : )
OK, just pushed this:
Cool, the assume
part from the assume val
is not dangerous though,
but if it is ok for everyone, keeping it that way is fine with me : )
Cool, the assume part from the assume val is not dangerous though,
I'm confused, didn't you mean the opposite when you wrote "I would treat assume the same way admit is."?
~My bad the sentence should have been "I would treat assume alone the same way admit is. : )" ~
Ah, OK. Why is assume val
safe?
Well actually not that much, it is true. In most cases I use assume val
for unimplemented functions or "external" functions, but it could be the wrong spec too. I didn't immediately realize because I always give a let
and an admit
for my admitted lemmas but because we can assume val
a lemma or whatever, it can also be unsafe... Sleep deprevation, sorry ! :(
As I said this is a great change, I am totally fine with it ! Thanks Clément ;)
I agree that it's okay to default to highlighting assume val
as well. If it's an assumption about the external world, then you're not likely to remove it, but highlighting it would help you or a future reader notice the assumptions you've added.
On a separate note, FWIW, I think I'm up-to-date (I have version 20180708.1438
of fstar-mode), but my display still looks the same as before. This is Aquamacs though. When I try it in Emacs, it looks like Clement's display above, so it must be an Aquamacs thing.
Great, thanks.
On a separate note, FWIW, I think I'm up-to-date (I have version 20180708.1438 of fstar-mode)
Try updating again (MELPA doesn't build immediately after code is committed) :)
I pulled again, and now assume
is showing up in the same scary color as admit
, so I think we're in good shape 👍
Thanks!
Would it be possible to highlight (via enlarged/bold text or scary emoticons), uncommented calls to
assume
oradmit
? It might help avoid those situations where all of your proofs start going through super smoothly, only you later realize that you left in anadmit
while debugging earlier. Not that it's ever happened to me of course. Asking for a friend.