Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
IDE library for Haskell based on the GHC API. This is not a real fork. I will upload my patches here so that nominolo can pick them
Haskell Emacs Lisp

This branch is 220 commits behind nominolo:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
emacs
examples
programs
src
tests
.gitignore
LICENSE
Makefile
README.markdown
Setup.hs
config.mk.sample
scion.cabal

README.markdown

Introduction

Scion is a Haskell library that aims to provide Haskell source code inspection and transformation functionality as well as various other features that may be useful for an IDE.

Most of Scion's functionality is based on the GHC API. Scion tries to be front-end agnostic; it provides both a Haskell API and servers for non-Haskell clients such as Emacs (no Vim, volunteers required).

Installation

(For developer builds see section "Hacking" below.)

Scion requires GHC 6.10.1 or later. All other dependencies should be on Hackage and can be installed using cabal-install:

$ cd dir/to/scion
$ cabal install

Scion supports various configuration flags which are useful when working on Scion itself.

Usage

TODO

Emacs

TODO

$ cd <scion>
$ cabal install -femacs
$ ./.cabal/bin/emacs_server

Emacs:

(add-to-list 'load-path "<scion>/emacs")
(require 'scion)

(add-hook 'haskell-mode-hook 'my-scion-hook)
(defun my-scion-hook ()
  (scion-mode 1))

M-x scion-connect
M-x scion-open-cabal-project
M-x scion-load-library

C-c i l  -- insert language pragma
C-c i p  -- insert pragma
C-c i m  -- insert (external) module name

Bug Reports

Please send bug reports or feature requests to the Issue tracker.

Discussion

For discussions about Scion use the scion-lib-devel mailing list.

Hacking

The main repository for Scion is hosted on Github. Get it via

$ git clone git://github.com/nominolo/scion

Send patches or pull requests to nominolo (email address at googlemail dot com). Note that, if you fork the project on Github your fork won't take up additional space on your account.

Building

For development it is probably easier to use the GNU make than Cabal directly. The makefile includes a file called config.mk which is not present by default. You can use the provided config.mk.sample and edit it:

$ cp config.mk.sample config.mk
$ edit config.mk

After that, the makefile takes care of the rest.

$ make           # configure and build
$ make install   # configure, build, and install

If you don't have the dependencies, yet, and have cabal-install, the following may be helpful (If it's not in the path, adjust config.mk accordingly):

$ make cabal-install

(This also installs Scion, but that shouldn't interfere with hacking.)

Using an in-place GHC

GHC 6.10.1 has a couple of problems. For example, not all error messages are reported using the GHC API but instead are printed to stdout/stderr. Some parts also call exitWith directly. GHC's HEAD branch has some of these bugs fixed and may contain new features not present in the stable branch. If you want to compile against an inplace GHC, the following steps should work:

  1. On windows, make sure that Cabal finds the inplace gcc

    $ cd /path/to/ghc
    $ cp `which gcc` ghc/
    

    (Adjust to version of GCC that GHC was compiled with.)

  2. Set the GHC_PATH variable to the correct path to for your system. Make sure not to set HC, PKG, or HADDOCK, they will automatically be set to point to the inplace versions.

  3. Use make or make cabal-install as above.

Something went wrong with that request. Please try again.