Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add syntax highlighting for LiquidHaskell annotations #78

Merged
merged 4 commits into from
Dec 14, 2018

Conversation

ranjitjhala
Copy link
Contributor

@ranjitjhala ranjitjhala commented Dec 14, 2018

Hi, I'd be very obliged if you could merge this PR that adds syntax-highlighting
for LiquidHaskell (LH) annotations.

LH is a refinement type checker, described here, which checks annotations written as special Haskell comments of the form:

{-@ incr :: x:Nat -> {v:Nat | v > x } @-}
incr x = x + 1 

I love using vscode with this extension, except that when I write LH
type signatures they show up as plain comments which are bit hard to
read. This PR simply renders stuff within the comments {-@ ... @-}
as plain Haskell, making it much easier to read. For example, here's a
screenshot with this PR:

vscode-screenshot

I added a similar thing to the plugins for emacs, atom and vim a while back
but I much prefer to use code now :)

Thanks!

@JustusAdam
Copy link
Owner

Cool. Thanks for the contribution. This seems like a nice improvement.

@JustusAdam JustusAdam merged commit 5fb9c3e into JustusAdam:master Dec 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants