purescript-contrib / purescript-vim

Syntax highlighting and indentation for PureScript
BSD 2-Clause "Simplified" License
154 stars 35 forks source link

Natural transformations #67

Closed samhh closed 1 year ago

samhh commented 4 years ago

Defined in PureScript's prelude is the NaturalTransformation type, which is basically a shorthand from f a -> g a to f ~> g.

The ~> operator does not seem to be getting the same highlighting as -> and =>.

eviefp commented 4 years ago

There is a distinction between ->, => and ~>. The latter is user-defined (even if it's in Prelude, it's not something the compiler is aware of).

The vim Haskell plugin, OTOH, just highlights all operators the same.

I would be okay with both options, but not really okay with just picking a few extra operators to add to the list. What do you think?

samhh commented 4 years ago

I suppose highlighting all operators the same is preferable provided that won't create bigger edge case problems?

eviefp commented 4 years ago

Not sure, but I will look into it sometime within the next week or so!

toastal commented 1 year ago

Fixed in https://github.com/purescript-contrib/purescript-vim/commit/cc511bdda7551c0ddac2f368bd129ac0bba87c1a.patch