Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ If a function argument is not used it must be
prefixed with an underscore to explicitly mark it as
unused.

## First-Class and Higher-Order Functions
## Higher-Order Functions

A _higher-order function_ is a function that takes a
parameter which is itself a function.
Expand Down
11 changes: 5 additions & 6 deletions src/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Once you have Java 21+ installed there are two ways to proceed:
- You can use the [Flix VSCode extension](https://marketplace.visualstudio.com/items?itemName=flix.flix) (__highly recommended__) or
- You can run the Flix compiler from the command line.

## Using Flix from Visual Studio Code (VSCode)
## Using Flix from VSCode

Flix comes with a fully-featured VSCode plugin. Follow these steps to get
started:
Expand Down Expand Up @@ -52,7 +52,7 @@ get started:
nvim --version
```

### Neovim Flix plugin
### Neovim Plugin

There is a Lua [plugin](https://github.com/flix/nvim) which provides an LSP configuration for the native neovim lsp, and several functions to interact with the flix cli. It's repo has detailed installation and configuration instructions.
It can be installed with a plugin manager of choice or cloned locally into your neovim runtime path.
Expand Down Expand Up @@ -117,7 +117,7 @@ The snippet above provides the following keybindings.

![Visual Studio Code1](images/neovim.png)

### Manual Neovim Configuration
### Manual Configuration

If you would rather setup the LSP server yourself the code from the plugin is as follows.

Expand Down Expand Up @@ -187,7 +187,7 @@ vim.api.nvim_create_autocmd("FileType", {

Flix can be used from [Emacs](https://www.gnu.org/software/emacs/) as well by installing the [flix-mode](https://codeberg.org/mdiin/flix-mode) package. Follow the instructions there to get started writing Flix code in Emacs.

## Using Flix from the Command Line
## Using Flix from the CLI

Flix can also be used from the command line. Follow these steps:

Expand All @@ -196,8 +196,7 @@ Flix can also be used from the command line. Follow these steps:
> 3. Enter the created directory (e.g. `cd my-flix-project`) and run `java -jar flix.jar init` to create an empty Flix project.
> 4. Run `java -jar flix.jar run` to compile and run the project.


## Using nix
## Installing Flix with Nix

Flix can also be installed using the [nix package manager](https://nixos.org/).
To install for the currently running shell run:
Expand Down
2 changes: 1 addition & 1 deletion src/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ always a 1:1 correspondence between the Flix language and what is reported in
the editor. The advantages are many: (a) diagnostics are always exact, (b) code
navigation "just works", and (c) refactorings are always correct.

## Look 'n' Feel
## Look and Feel

Here are a few programs to illustrate the look and feel of Flix:

Expand Down
4 changes: 2 additions & 2 deletions src/primitive-types.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Primitive Types
# Primitives

Flix supports the primitive types:

Expand All @@ -21,7 +21,7 @@ Flix supports the primitive types:
written without suffix, i.e. `123.0f64` can simply be written
as `123.0` and `123i32` can be written as `123`.

## Built-in Literals
## Literals

Flix has built-in syntactic sugar for lists, sets, maps and regex.

Expand Down
4 changes: 2 additions & 2 deletions src/records.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ let p2 = { -y | p1 };
Here the record `p2` has the same labels as `p1` except that the `y` label has
been removed.

## Row Polymorphism: Open and Closed Records
## Row Polymorphism

A function may specify that it requires a record with two labels:

Expand All @@ -104,7 +104,7 @@ def g(r: {x = Int32, y = Int32 | s}): Int32 = r#x + r#y
We can call this function with *any* record as long as it has `x` and `y` labels
which are of type `Int32`. We say that the record type of `r` is *open*.

## Named Parameters with Records
## Named Parameters

When a function has multiple parameters that share the same type, it is easy to
get confused about the right argument order. For example, what does
Expand Down