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

Improved Haskell and PureScript #3020

merged 2 commits into from Jul 30, 2021


Copy link

@RunDevelopment RunDevelopment commented Jul 30, 2021

I made changes to PureScript according to #3006. I also made improvements to Haskell all of which trickle down to PureScript.

Haskell changes:

  • . is now highlighted as punctuation inside import statements, hvariables, and constants.
  • Hvariables and constants can now end with a '. The \b at the end of both patterns previously prevented this.
  • I split the operator regex into 3 regexes to make it easier to understand. I also simplified the ASCII operator regex (3).

PureScript changes:

  • . is now highlighted as punctuation inside import statements.
  • Improved ASCII operators as discussed here.
  • Support all UTF16 Unicode operators. This means that all Unicode operators symbols in the BMP are supported. Symbols in the astral planes are not supported because they aren't commonly used and increase the file size by a lot.

This resolves #3006.

Copy link

@github-actions github-actions bot commented Jul 30, 2021

JS File Size Changes (gzipped)

A total of 2 files have changed, with a combined diff of +684 B (+34.7%).

file master pull size diff % diff
components/prism-haskell.min.js 1.5 KB 1.53 KB +25 B +1.7%
components/prism-purescript.min.js 465 B 1.12 KB +659 B +141.7%

Generated by 🚫 dangerJS against 82522b6


Copy link
Member Author

@RunDevelopment RunDevelopment commented Jul 30, 2021

PureScript gains a bit of weight but it's still smaller than Haskell, so it should be alright.

@toastal, this should solve your issue, right?


Copy link

@toastal toastal commented Jul 30, 2021

lgtm 👍


@RunDevelopment RunDevelopment merged commit 679539e into PrismJS:master Jul 30, 2021
11 checks passed
@RunDevelopment RunDevelopment deleted the issue3006 branch Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants