Table of Contents

Editing Curry programs

Of course, one can use any text editor to write and modify Curry programs. However, for some editors/IDEs (listed below), there exist specific modes to edit or highlight Curry programs.

Visual Studio Code

In order to get Curry language support in Visual Studio Code, you have to build the Curry Language Server on your machine which requires Haskell stack. If you have `stack` installed, download the repository, run stack install, and add ~/.local/bin to your path. For example, execute the following commands:

  > git clone https://github.com/fwcd/curry-language-server
  > cd curry-language-server
  > stack install
  > export PATH=~/.local/bin:$PATH

After building the Curry Language Server, start Visual Studio Code. Then:

    "curry.languageServer.importPaths": [
      "/home/mh/pakcs/lib"
    ],

Emacs

The distributions of the Curry systems PAKCS and KiCS2 contain (in the directory tools/emacs) a Curry mode (adapted from a Haskell mode) for the editor Emacs. The installation and usage is described in the distributed README file.

Kate

The Kate editor contains syntax highlighting for Curry programs. This mode can be activated by Kate's download mechanism. To do this, start Kate and go to

  Setting
    -> Configure Kate ...
        -> Open/Save
             -> Modes & Filetypes
                 -> Download Highlighting Files ...

In the dialog, just select Curry (it not already selected), click Install and wait for the installation to finish. You must restart Kate for the installation to take effect.

Atom

The Atom editor contains syntax highlighting and snippets for Curry programs with the package language-curry. To download the package, start Atom and navigate to

  Settings
    -> Install

type in language-curry and hit RETURN. Select the corresponding package, click Install and wait for the installation to finish. Alternatively, it is possible to download the package via command-line with the Atom Package Manager apm (must be in your PATH):

  > apm install language-curry