Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 149 lines (93 sloc) 3.921 kb
daad9b2 @nominolo Start a README.
nominolo authored
1
2 Introduction
3 ============
4
5 [Scion][home] is a Haskell library that aims to provide Haskell source
6 code inspection and transformation functionality as well as various
7 other features that may be useful for an IDE.
8
9 Most of Scion's functionality is based on the GHC API. Scion tries to
10 be front-end agnostic; it provides both a Haskell API and servers for
74372e1 @nominolo Document developer's build process in README.
nominolo authored
11 non-Haskell clients such as Emacs (no Vim, volunteers required).
daad9b2 @nominolo Start a README.
nominolo authored
12
13 [home]: http://code.google.com/p/scion-lib/
14
15
16 Installation
17 ============
18
74372e1 @nominolo Document developer's build process in README.
nominolo authored
19 (For developer builds see section "Hacking" below.)
20
daad9b2 @nominolo Start a README.
nominolo authored
21 Scion requires [GHC 6.10.1][ghc] or later. All other dependencies
ab7b94c @nominolo Fix a few more links in the README.
nominolo authored
22 should be on [Hackage][hackage] and can be installed using
23 [cabal-install][ci]:
daad9b2 @nominolo Start a README.
nominolo authored
24
25 $ cd dir/to/scion
26 $ cabal install
27
28 Scion supports various configuration flags which are useful when
29 working on Scion itself.
30
31 [ghc]: http://haskell.org/ghc/download.html
ab7b94c @nominolo Fix a few more links in the README.
nominolo authored
32 [hackage]: http://hackage.haskell.org/packages/hackage.html
33 [ci]: http://hackage.haskell.org/trac/hackage/wiki/CabalInstall
daad9b2 @nominolo Start a README.
nominolo authored
34
74372e1 @nominolo Document developer's build process in README.
nominolo authored
35
36
daad9b2 @nominolo Start a README.
nominolo authored
37 Usage
38 =====
39
b28d2de @nominolo Update README slightly
nominolo authored
40 Since Scion is a library, you should consult the haddock documentation
41 for how to use it. However, you may look at the Emacs frontend for
42 inspiration.
43
44 The Emacs frontend is implemented as a Haskell server
daad9b2 @nominolo Start a README.
nominolo authored
45
46 Emacs
47 -----
48
b28d2de @nominolo Update README slightly
nominolo authored
49
daad9b2 @nominolo Start a README.
nominolo authored
50
51 $ cd <scion>
52 $ cabal install -femacs
53 $ ./.cabal/bin/emacs_server
54
55 Emacs:
56
57 (add-to-list 'load-path "<scion>/emacs")
58 (require 'scion)
59
60 (add-hook 'haskell-mode-hook 'my-scion-hook)
61 (defun my-scion-hook ()
62 (scion-mode 1))
63
64 M-x scion-connect
65 M-x scion-load-cabal-project
66 M-x scion-load-library
67
68 C-c i l -- insert language pragma
69 C-c i p -- insert pragma
70 C-c i m -- insert (external) module name
71
72
73 Bug Reports
74 ===========
75
76 Please send bug reports or feature requests to the [Issue tracker][issues].
77
78 [issues]: http://code.google.com/p/scion-lib/issues/list
79
50099db @nominolo Add link to mailing list to README.
nominolo authored
80 Discussion
81 ==========
82
96ce6f2 @nominolo Github's markdown implementation is buggy... grrr..
nominolo authored
83 For discussions about Scion use the [scion-lib-devel][ml] mailing list.
50099db @nominolo Add link to mailing list to README.
nominolo authored
84
96ce6f2 @nominolo Github's markdown implementation is buggy... grrr..
nominolo authored
85 [ml]: http://groups.google.com/group/scion-lib-devel
50099db @nominolo Add link to mailing list to README.
nominolo authored
86
daad9b2 @nominolo Start a README.
nominolo authored
87
88 Hacking
89 =======
90
ab7b94c @nominolo Fix a few more links in the README.
nominolo authored
91 The main repository for Scion is hosted on [Github][gh]. Get it via
daad9b2 @nominolo Start a README.
nominolo authored
92
93 $ git clone git://github.com/nominolo/scion
94
95 Send patches or pull requests to nominolo (email address at googlemail
96 dot com). Note that, if you fork the project on Github your fork
97 won't take up additional space on your account.
98
ab7b94c @nominolo Fix a few more links in the README.
nominolo authored
99 [gh]: http://github.com
74372e1 @nominolo Document developer's build process in README.
nominolo authored
100
101
102 Building
103 --------
104
105 For development it is probably easier to use the GNU make than Cabal
106 directly. The makefile includes a file called `config.mk` which is
107 not present by default. You can use the provided `config.mk.sample`
108 and edit it:
109
110 $ cp config.mk.sample config.mk
111 $ edit config.mk
112
113 After that, the makefile takes care of the rest.
114
115 $ make # configure and build
116 $ make install # configure, build, and install
117
118 If you don't have the dependencies, yet, and have `cabal-install`, the
119 following may be helpful (If it's not in the path, adjust `config.mk`
120 accordingly):
121
122 $ make cabal-install
123
124 (This also installs Scion, but that shouldn't interfere with hacking.)
125
126
127 Using an in-place GHC
128 ---------------------
129
130 GHC 6.10.1 has a couple of problems. For example, not all error
131 messages are reported using the GHC API but instead are printed to
132 stdout/stderr. Some parts also call `exitWith` directly. GHC's HEAD
133 branch has some of these bugs fixed and may contain new features not
134 present in the stable branch. If you want to compile against an
135 inplace GHC, the following steps should work:
136
137 1. On windows, make sure that Cabal finds the inplace gcc
138
f9c2a27 @nominolo Typo and small formatting fixes.
nominolo authored
139 $ cd /path/to/ghc
140 $ cp `which gcc` ghc/
74372e1 @nominolo Document developer's build process in README.
nominolo authored
141
142 (Adjust to version of GCC that GHC was compiled with.)
143
144 2. Set the `GHC_PATH` variable to the correct path to for your
145 system. Make sure *not* to set `HC`, `PKG`, or `HADDOCK`, they
f9c2a27 @nominolo Typo and small formatting fixes.
nominolo authored
146 will automatically be set to point to the inplace versions.
74372e1 @nominolo Document developer's build process in README.
nominolo authored
147
148 3. Use `make` or `make cabal-install` as above.
Something went wrong with that request. Please try again.