[Hol-info] Pretty printing of strings without double-quotes?

2017-04-23 Thread Chun Tian (binghe)
Hi, I have a simple data type based on strings: val _ = Datatype `Label = name string | coname string`; Is is possible to set up pretty-printing (or gammar) rules, such that: 1. The term `` `a` `` can be interpreted as `` name “a” `` 2. The term`` -`a` `` can be interpreted as `` coname “a” ``

Re: [Hol-info] Pretty printing of strings without double-quotes?

2017-04-23 Thread Michael.Norrish
There’s no great way to do this at the moment, because it’s not possible to have all the things that are possible inside string literals (e.g., \n) appear in other contexts. My inclination would be overload n to name, and to overload unary negation to coname, and then you could write n"a" an