Rosetta Code:Village Pump/Syntax highlighting: Difference between revisions

Line 606:
exn</lang>
* I have keep in_channel and out_channel in the list because I think we should use the same color.
* float is a type in contexts where ocaml expects a type and a function in contexts where ocaml expects a function. So we could keep it as a function, or convert it to a type. I'm not sure which is best, but in RC context it seems it is most often the function.</blockquote>
</blockquote>
 
* not a bug nor an issue, but a suggestion: maybe we could highlight labels (names with a tild before it):
<blockquote><lang ocaml>let my_compare ~left ~right =
(* ... *)</lang></blockquote>
 
I propose this style (<code>font-weight:bold; color:#339933;</code>):
<span style="font-weight: bold; color: #339933;">~left</span>
</blockquote>
 
* not a bug nor an issue, but a suggestion: maybe we could highlight polymorphic variants (names with a backtick before it):
Line 617 ⟶ 620:
Left (* constructor of a non-polymorphic variant *)</lang>
''IMHO'' these two kinds of constructors should be highlighted with the same color.
 
I suggest this style (<code>font-weight:bold; color:#993399;</code>):
<span style="font-weight: bold; color: #993399;">Left</span>
<span style="font-weight: bold; color: #993399;">`left</span>
(if the highlight for names following a dot is removed as suggested above, because this is the same color)
</blockquote>