Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Sublime Text 2 plugin that adds some useful features for working with Haskell code.
Python Haskell
branch: master

This branch is 350 commits behind SublimeHaskell:master

Failed to load latest commit information.
.gitignore Added .gitignore
.hgignore Ignore Sublime files.
Cabal.sublime-commands Moved commands
CabalInspector.hs
Cubicle.tmTheme
Default.sublime-commands Fixed typo, added check&lint to commands
Default.sublime-keymap Fixed default keymap command
Haskell.sublime-completions
LICENSE.txt
Language.sublime-snippet Add LANGUAGE snippet
Main.sublime-menu Add SublimeHaskell settings to menu
ModuleInspector.hs
README.md Changed docs
SublimeHaskell.sublime-settings Added several cabal-dev sanboxes support
TODO.txt Fixed TODO, removed logs
autobuild.py Added check+lint on save
autocomplete.py Fixed settings preloading
cabalbuild.py Fixed command name
ghcmod.py
haskell_type.py
parseoutput.py Added go to definition and analyzing for all open folders
stylishhaskell.py Fixed CR-LF endings
sublime_haskell_common.py Fixed settings preloading

README.md

README

Requirements

  • ghc
  • cabal
  • Cabal packages: base, bytestring, data-aeson, haskell-src-exts
  • ghc-mod (for import and LANGUAGE completions and type inference)
  • stylish-haskell

Installation

  1. Get Sublime Text 2: http://www.sublimetext.com/
  2. Install the Sublime Package Control package: http://wbond.net/sublime_packages/package_control/installation
  3. Use Package Control to install this package (SublimeHaskell)

Usage

When editing Haskell source files that are part of a Cabal project, automatic error highlighting and enhanced auto-completion are available.

Each time you save, any errors in your program will be listed at the bottom of the window and highlighted in the source code.

All source files in the project are scanned when the change. Any symbols that they export are provided in the auto-complete suggestions.

To use cabal-dev instead of cabal, set use_cabal_dev to true (or use command "Switch Cabal/Cabal-Dev") and specify cabal-dev absolute path. Completion list will be rescanned and build will use cabal-dev.

Stylish-haskell can be used to stylish file or selected text.

Keybindings

You can add key bindings for type inference to Key Bindings - User:

    {
        "command": "haskell_show_type",
        "context": "source.haskell",
        "keys": ["ctrl+k", "ctrl+h", "ctrl+t"]
    },
    {
        "command": "haskell_insert_type",
        "context": "source.haskell",
        "keys": ["ctrl+k", "ctrl+h", "ctrl+i"]
    }
Something went wrong with that request. Please try again.