Syntax highlight for numeric literals

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Syntax highlight for numeric literals

Takenobu Tani
Dear cafe,

I wrote and pushed a bit about the syntax highlights of numeric literals for `BinaryLiterals`, `HexFloatLiterals` and `NumericUnderscores` extensions on editors.

  https://github.com/takenobu-hs/haskell-numeric-highlight

I'm glad if this helps you.

Regards,
Takenobu


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: Syntax highlight for numeric literals

Iustin Pop-3
On 2018-01-05 14:34:28, Takenobu Tani wrote:
> Dear cafe,
>
> I wrote and pushed a bit about the syntax highlights of numeric literals
> for `BinaryLiterals`, `HexFloatLiterals` and `NumericUnderscores`
> extensions on editors.
>
>   https://github.com/takenobu-hs/haskell-numeric-highlight
>
> I'm glad if this helps you.

This is interesting, thanks. I'm surprised that Emacs/haskell-mode is
the only case where the 'exact' version cannot be implemented. Do you
know/can you explain why?

thank you,
iustin
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|

Re: Syntax highlight for numeric literals

Takenobu Tani
Hi iustin,

Thank you for reply.

> I'm surprised that Emacs/haskell-mode is the only case where the 'exact' version cannot be implemented. Do you know/can you explain why?

It's simple.
`font-lock` was a bit difficult for me :)

Haskell-mode highlights strings (e.g. constructor, type, ...) other than numeric literals.
(Numeric literals are not highlighted.)

In order to correct the highlights of numeric literals,
it seems necessary to accurately define highlights other than numeric literals.

Regards,
Takenobu


2018-01-07 22:09 GMT+09:00 Iustin Pop <[hidden email]>:
On 2018-01-05 14:34:28, Takenobu Tani wrote:
> Dear cafe,
>
> I wrote and pushed a bit about the syntax highlights of numeric literals
> for `BinaryLiterals`, `HexFloatLiterals` and `NumericUnderscores`
> extensions on editors.
>
>   https://github.com/takenobu-hs/haskell-numeric-highlight
>
> I'm glad if this helps you.

This is interesting, thanks. I'm surprised that Emacs/haskell-mode is
the only case where the 'exact' version cannot be implemented. Do you
know/can you explain why?

thank you,
iustin


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.