Skip to content

Font lock Role annotations #1057

Closed
@mrBliss

Description

@mrBliss

I just noticed #1056 and realised that Role annotations are also not properly font locked.

Some examples that demonstrate that GitHub's syntax highlighting has the same problem 😃:

{-# LANGUAGE RoleAnnotations #-}

type role Ptr representational
data Ptr a = Ptr Addr#

type role Foo nominal representational phantom
data Foo a b c = Foo a b

The role keyword must only be highlighted after type, analogous to family. But what about phantom, representational, and nominal? They are also special keywords in this particular context, but specifying a regex for this seems nontrivial.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions