Haskell ide для windows

Downloads

There are three widely used ways to install the Haskell toolchain on supported platforms. These are:

Minimal installers: Just GHC (the compiler), and build tools (primarily Cabal and Stack) are installed globally on your system, using your system’s package manager.

Stack: Installs the stack command globally: a project-centric build tool to automatically download and manage Haskell dependencies on a project-by-project basis.

Haskell Platform: Installs GHC, Cabal, and some other tools, along with a starter set of libraries in a global location on your system.

These options make different choices as to what is installed globally on your system and what is maintained in project-specific environments. Global installations allow more sharing across users and projects, but at the cost of potential conflicts between projects. To avoid these conflicts, each option has a lightweight sandboxing feature that creates largely self-contained, per-project environments. With Minimal you can optionally sandbox the libraries, avoiding most conflicts. Stack sandboxes the compiler, tools and libraries, so avoids nearly all kinds of conflicts between projects. With Platform you can also optionally sandbox libraries, but not the globally installed platform libraries.

Haskell IDEs & other distributions

In addition to the generic, cross-platform Haskell toolchain described above, there are also easy-to-use, platform-specific distributions and IDEs. The Haskell Wiki contains a list of the most popular ones.

Minimal installers

What they are

Minimal installers provide centrally the GHC compiler and the Cabal and Stack tools for installing packages. Some may install further build tools (i.e.В for parsing and lexing) as well.

What you get

  • Only the core libraries necessary for each platform are included.
  • Cabal or Stack must be used to download and install packages after installation.

How to get them

  • Linux
  • OS X (via the core platform)
  • Windows (via the core platform)

Where to get help

  • For help learning Haskell itself, start with the Documentation page on the Haskell Wiki.
  • If you need help with GHC—the Haskell compiler—there is a comprehensive GHC User Manual.
  • For help using Cabal to download or create additional packages (see below), there is the Cabal User Guide.
  • For help using Stack to download or create packages, see the stack documentation below.
  • Finally, you can ask questions of other Haskell users and experts on the #haskell IRC channel on the Freenode IRC network.

Stack

What it is

Stack is a cross-platform build tool for Haskell that handles management of the toolchain (including the GHC compiler and MSYS2 on Windows), building and registering libraries, and more.

What you get

  • Once downloaded, it has the capacity to download and install GHC and other core tools.
  • Project development is isolated within sandboxes, including automatic download of the right version of GHC for a given project.
  • It manages all Haskell-related dependencies, ensuring reproducible builds.
  • It fetches from a curated repository of over a thousand packages by default, known to be mutually compatible.
  • It can optionally use Docker to produce standalone deployments.

How to get it

The install and upgrade page describes how to download Stack on various platforms, although the main three are repeated here:

Читайте также:  Планировщики для ядра linux

Instructions for other Linux distributions, including Debian, Fedora, Red Hat, Nix OS, and Arch Linux, are also available.

Where to get help

For help with Haskell and GHC in general, see the links mentioned above. For Stack itself there are also the following resources:

  • The README offers a general overview, and help with installation.
  • There is an in-depth guide to using Stack.
  • Getting started with Stack introduces how to build new projects using Stack.
  • You may post issues and feature requests on its GitHub issue tracker.
  • There is a mailing list for Stack
  • There is a dedicated #haskell-stack IRC channel on the Freenode IRC network.
  • The StackOverflow haskell-stack tag has many stack-specific questions and answers.

Haskell Platform

What it is

The Haskell Platform is a self-contained, all-in-one installer. After download, you will have everything necessary to build Haskell programs against a core set of useful libraries. It comes in both core versions with tools but no libraries outside of GHC core, or full versions, which include a broader set of globally installed libraries.

What you get

  • The Glasgow Haskell Compiler
  • The Cabal build system, which can install new packages, and by default fetches from Hackage, the central Haskell package repository.
  • the Stack tool for developing projects
  • Support for profiling and code coverage analysis
  • 35 core & widely-used packages

How to get it

The Platform is provided as a single installer, and can be downloaded at the links below.

Where to get help

  • You can find a comprehensive list of what the Platform offers.
  • See the general help mentioned above, which covers the usage of GHC, as well as the Cabal and Stack tools.

Additional Libraries

In Haskell, packages are configured and built with the Cabal package system built into GHC (and other compilers). For more specific details, see The Cabal User Guide. The command line tools to download and install packages are either cabal or stack , each having different workflows. For details on their usage, see the documentation above.

Hackage

Hackage is a repository of packages to which anyone can freely upload at any time. The packages are available immediately and documentation will be generated and hosted there. It can be used by cabal install.

You can install a package using cabal by running:

Note that if you are not in a sandbox, this will install the package globally, which is often not what you want, so it is recommended to set up sandboxes in your project directory by running cabal sandbox init .

LTS Haskell

LTS Haskell is a stackage-based long-term support set of packages which build and pass tests together, with backported bug fixes.

Stackage Nightly

Stackage is a nightly generated stable repository of snapshots of package sets in which only packages which build and pass tests together are bundled together into a snapshot.

From source control repositories

Installing from a source repository is also possible. For example, to clone and install the network package from source, you would run:

Haskell ide для windows

The IDE world in Haskell is incomplete, but is in motion. There are many choices. When choosing your IDE, there are the following things to consider.

Contents

Notable features of interest to consider

This is a list of features that any Haskell IDE could or should have. The IDEs listed below generally support some subset of these features. Please add more to this list if you think of anything. In future this should be expanded into separate headings with more description of how they would desirably work. For a discussion of IDEs there is the haskell-ide mailing list and the haskell-ide repository

  • Syntax highlighting (e.g. for Haskell, Cabal, Literate Haskell, Core, etc.)
  • Macros (e.g. inserting imports/aligning/sorting imports, aligning up text, transposing/switching/moving things around)
  • Type information (e.g. type at point, info at point, type of expression)
  • IntelliSense/completion (e.g. jump-to-definition, who-calls, calls-who, search by type, completion, etc.)
  • Project management (e.g. understanding of Cabal, configuration/building/installing, package sandboxing)
  • Interactive REPL (e.g. GHCi/Hugs interaction, expression evaluation and such)
  • Knowledge of Haskell in the GHCi/GHC side (e.g. understanding error types, the REPL, REPL objects, object inspection)
  • Indentation support (e.g. tab cycle, simple back-forward indentation, whole area indentation, structured editing, etc.)
  • Proper syntactic awareness of Haskell (e.g. with a proper parser and proper editor transpositions a la the structured editors of the 80s and Isabel et al)
  • Documentation support (e.g. ability to call up documentation of symbol or module, either in the editor, or in the browser)
  • Debugger support (e.g. stepping, breakpoints, etc.)
  • Refactoring support (e.g. symbol renaming, hlint, etc.)
  • Templates (e.g. snippets, Zen Coding type stuff, filling in all the cases of a case, etc.)
Читайте также:  Биос linux не видит флешку

Open Source

Haskell Language Server

In 2020, Haskell Language Server (HLS) was launched, which can be queried from most of the editors below. There are installation instructions for many of the editors below, so that is a good place to start, if you want to be using HLS.

Visual Studio Code

Visual Studio Code is a full featured IDE with several Haskell extensions available, such as Haskero, Haskelly and Haskell Language Server.

IntelliJ plugin for Haskell

Leksah (for Nix)

As of October 2019 maintained only with Nix. (See [commit history](https://github.com/leksah/leksah/commits/master))

Leksah is an IDE for Haskell written in Haskell. Leksah is intended as a practical tool to support the Haskell development process. Leksah uses GTK+ as GUI Toolkit with the gtk2hs binding. It is platform independent and should run on any platform where GTK+, gtk2hs and GHC can be installed.

  • http://www.leksah.org/
  • https://hackage.haskell.org/package/leksah
  • https://github.com/leksah/leksah

Emacs

Atom is very similar to Sublime Text 2 (which is now discontinued). A huge package database exists and two packages important to haskell developers are:

  • language-haskell for haskell syntax highlighting.
  • ide-haskell for cabal-support, linting and ghc-mod utilities like type previewing.

Ghcid — Very low feature GHCi based IDE

Not an editor per se, but a barebone IDE that will let you know compilation error any time you save a file. Doesn’t integrate with any editor but works well with any of them + a terminal emulator.

KDevelop

Commercial

Haskell for Mac

Haskell for Mac is an easy-to-use integrated programming environment for Haskell on OS X. It is a one-click install of a complete Haskell system, including Haskell compiler, editor, many libraries, and a novel form of interactive Haskell playgrounds. Haskell playgrounds support exploration and experimentation with code. They are convenient to learn functional programming, prototype Haskell code, interactively visualize data, and to create interactive animations.

Features include the following:

  • Built-in Haskell editor with customisable themes, or you can use a separate text editor.
  • Autosaving and automatic project versioning.
  • Interactive Haskell playgrounds evaluate your code as you type.
  • Playground results can be text or images produced by the Rasterific, Diagrams, and Chart packages.
  • Add code and multimedia files to a Haskell project with drag’n’drop.
  • Haskell binding to Apple’s 2D animation and games framework SpriteKit.

Haskell for Mac requires OS X Yosemite or above.

Sublime-Haskell

Sublime-Haskell is a plugin for the Sublime Text Editor. It is installed through the Sublime Package Controller.

It is built as a plugin to the Sublime text editor, so all the standard editing functionality is there. Here are the Haskell specific features:

  • Syntax highlighting and error marking for Haskell and Cabal. Errors provided by interaction with the compiler. The errors are listed in an error pane, and the user can navigate through the errors.
  • When working on a project that has a Cabal file, the Cabal file is detected, and the project can be configured, built, run, and tested using Cabal. The Cabal file is automatically detected. This also enhances error reporting, and auto-completion (all exported symbols from the project can then be matched against). Thus, there is good project management support.
  • Rescan/build on file change.
  • Can use Cabal-dev for sandboxing/pristine builds.
  • Prettification/indentation and alignment via Stylish-Haskell.
  • Jump to definition, and show information for a definition (using haskell-docs).
  • Type display and insertion
  • Fast building and type-inference via hdevtools.
  • HLint provided by GHC-Mod.
Читайте также:  Не отображается раскладка клавиатуры windows 10

Thus, Sublime-Haskell satisfies all the requirements listed at the top of the wiki for a baseline Haskell IDE. Sublime-Text is closed source, but the Haskell plugin is open source.

See also

  • Results from the State of Haskell, 2011 Survey.
  • Categorized Weaknesses from the State of Haskell 2011 Survey, which barely touched upon IDEs.
  • Editors
  • Applications and libraries/Program development#Editor support
  • Shim; the aim of the shim (Superior Haskell Interaction Mode) project is to provide better support for editing Haskell code in VIM and Emacs

Other IDEs and Editors

The list below is incomplete. Please add to it with whatever you think of. This list should be expanded into sections, as above, with more details, with links to the actual documentation of the described features.

  • Vim — PROS: Free. Works on Windows. Works in terminal. Decent alignment support. Tag-based completion and jumps. Very good syntax highlighting, flymake (via Syntastic), Cabal integration, Hoogle. Documentation for symbol at point CONS: Arcane, difficult for new users. Some complain of bad indentation support.
  • Emacs— PROS: Free. Works on Windows. Works in terminal. Decent alignment, indentation, syntax highlighting. Limited type information (type and info of name at point). Cabal/GHC/GHCi awareness and Haskell-aware REPL. Completion and jump-to-definition (via ETAGS). Documentation of symbol at point. Hoogle. Documentation for symbol at point. Flymake (error checking on the fly). CONS: Arcane, difficult for new users.
  • Sublime — PROS: Works on Windows. CONS: Poor alignment support (though there are packages to do indentation a little better). Proprietary.
  • Yi — PROS: Written in Haskell. Works in terminal. CONS: Very immature, lacking features. Problems building generally, especially on Windows.
  • See also Editors
  • HEAT: An Interactive Development Environment for Learning & Teaching Haskell
  • GeanyPROS: Free. Works on Windows. Syntax highlighting, REPL. CONS: After using it for a while, Geany freezes quite often.

Outdated

EclipseFP plugin for Eclipse IDE (updated 2015)

Eclipse is an open, extensible IDE platform for «everything and nothing in particular». It is implemented in Java and runs on several platforms. The Java IDE built on top of it has already become very popular among Java developers. The Haskell tools extend it to support editing (syntax coloring, code assist), compiling, and running Haskell programs from within the IDE. In more details, it features:

  • Syntax highlighting and errors/warning highlighting
  • A module browser showing all installed packages, their modules and the contents of the modules (functions, types, etc.)
  • Integration with Hoogle: select an identifier in your code, press F4 and see the results in hoogle
  • Code navigation: from within a Haskell source file, jump to the file where a symbol in declared, or everywhere a symbol is used (type sensitive search, not just a text search)
  • Outline view: quickly jump to definitions in your file
  • Quick fixes on common errors and import management
  • A cabal file editor and integration with Cabal (uses cabal configure, cabal build under the covers), and a graphical view of installed packages
  • Integration with GHCi: launch GHCi inside Eclipse on any module
  • Integration with the GHCi debugger: performs the GHCi debugging commands for you from the standard Eclipse debugging interface
  • Integration with HLint: gives you HLint warning on building and allows you to quick fix them
  • Integration with Stylish-Haskell: format your code with stylish-haskell
  • Test support: shows results of test-framework based test suite in a graphical format. HTF support to come soon.

The plug-ins seem not to be maintained; the github pages says:

Оцените статью