Skip to content

Latest commit

 

History

3,734 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alexandrite

a language implementation for PureScript


Alexandrite is a language implementation for PureScript, powered by an incremental, query-based build system. Instead of a sequence of compiler phases, Alexandrite models compilation and semantic information as incrementally computed queries. These queries are used extensively to implement code intelligence features in the language server.

The build system is designed with interactive editing in mind. To support this, it tracks dependencies between inputs and queries, caches query results, deduplicates in-progress work across threads, and supports cooperative cancellation when inputs change. Crucially, many query results are designed to be incrementally reusable. For example, the compiler uses stable identities in lieu of source ranges to enable minimal recomputation across trivial formatting changes.

The language server component implements core code intelligence features such as completion, jump to definition, hover information, find references, workspace symbol search, and diagnostics.

Editor features

Alexandrite provides code intelligence for PureScript projects through its VS Code extension.

Completion

Completing a PureScript expression

Automatic imports

Automatically importing a completed PureScript name

Live diagnostics

Updating diagnostics while editing PureScript

Inferred types

Viewing an inferred PureScript type

Go to definition

Navigating to a PureScript definition

Find references

Finding references to a PureScript name

Rename

Renaming a PureScript name across files

Document symbols

Searching symbols in a PureScript document

Workspace symbols

Searching PureScript symbols across a workspace

Typed-hole suggestions

Replacing a typed hole with an Alexandrite suggestion

Document highlights

Highlighting occurrences of PureScript names

Semantic highlighting

Enabling semantic highlighting for PureScript

Installation

On Linux and macOS:

curl --proto '=https' --tlsv1.2 -LsSf \
  https://raw.githubusercontent.com/purefunctor/purescript-alexandrite/main/install.sh | sh

On Windows PowerShell:

irm https://raw.githubusercontent.com/purefunctor/purescript-alexandrite/main/install.ps1 | iex

The installers verify the release's GitHub build-provenance attestation when GitHub CLI is available. They display a warning and continue when it is not installed. Releases through v0.0.13 predate attestations, so the installers warn and continue without verification for those versions. Set ALEXANDRITE_VERSION to a release tag or ALEXANDRITE_INSTALL_DIR to an installation directory to override the defaults.

About

Language implementation for PureScript

Topics

Resources

Contributing

Stars

102 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages