purescript-contrib/purescript-vim

Class parameters not properly highlighted in class definitions

arthurxavierx opened this issue · 3 comments

In the following example, only the first parameter gets highlighted as a type variable:

class MyClass f a b where
  method :: f (a b) -> f b -> f (a b)

In the following example, none of the parameters get highlighted as a type variable:

class MyClass2 (f :: * -> *) a b where
  method2 :: f (a b) -> f b -> f (a b)
coot commented

I actually would prefer to keep them not highlighted. The reason is that it's really tricky to match end of class statement (it might span several lines and might not end with a where).

I see. I will try to work on this when I have some time. If we could create a syntax group for type level stuff then it just boils down to the problem of matching up to the end of the class statement. Shouldn't it be just matching against a where or an unindent?

coot commented

Having a syntax region for type signatures would be great. You add stuff on top of #35 if you feel that's ok,.