在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):nominolo/scion开源软件地址(OpenSource Url):https://github.com/nominolo/scion开源编程语言(OpenSource Language):Haskell 67.6%开源软件介绍(OpenSource Introduction):IntroductionScion is a Haskell library that aims to implement those parts of a Haskell IDE which are independent of the particular front-end. Scion is based on the GHC API and Cabal. It provides both a Haskell API and a server for non-Haskell clients such as Emacs and Vim. 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. Scion consists of a library and a server which is used by front-ends that are not written in Haskell. To install the library and server use:
This will install the executable If you do not want to install the server (and its dependencies), turn off the "server" flag which is enabled by default:
In order to use scion with your favourite front-end, see the specific instructions for the front-end below. The Emacs and Vim front-ends are included with Scion and their installation instruction follow below. The necessary files are installed with Scion by default and there is currently no option to turn this off. Bug ReportsPlease send bug reports or feature requests to the Issue tracker. UsageSince Scion is a library, you should consult the haddock documentation for how to use it. However, you may look at the Emacs frontend for inspiration. EmacsScion's Emacs mode should be seen as complimentary to the existing Haskell mode. To use it install the Scion server as described above. In the following we'll assume that the server has been install as:
Add the following to your emacs configuration (typically "~/.emacs"):
Scion mode needs to communicate with the external server. By default the server will be started automatically when needed. See "Manually Connecting to Scion" below for how to connect to the server manually. Scion uses Cabal as a library which in turn might look for external
programs such as happy or alex. In order to find these, the
The scion server process inherits the environment variables from the
Emacs process. Depending on your system this may be different than
what you would get if you started the server from the shell. To
adjust the
Once you have a running and connected Scion server, you can use the commands provided by scion-mode:
If loading generates any errors or warnings, a buffer will appear and
list them all. Pressing CompletionThe following commands offer completion for a few things.
Experimental featuresThe following should work most of the cases.
Manually Connecting to ScionIf you set the variable You can start the server manually on the command line and then use
to connect to that server. However, most of the time it will be more convenient to start the server from within Emacs:
VimInstallationVim mode requires Python support (version 2.4 or later). Vim 7.2 or later have Python support enabled by default. However, not every distribution of Vim includes a recent enough version of Python. Notably, MacVim is only linked against version 2.3.5 to be compatible with OS X 10.4. You will need to build it from source, which is however reasonably fast. To check for python support the following should return
To find out the version use:
Add the following to your
Note that there may be problems using "~" in the path, so better specify the absolute path. If you want to connect to a running instance of the server via TCP,
add (where
Add the following independently of which connection mode you prefer:
Depending on your Vim config you will need to add the following lines as well:
You store certain settings in a configuration file. (Note: This feature is currently experimental and details may change in future Scion releases.) To generate an initial configuration file run
Keep only these lines:
UsageTo load a component (a Cabal library or executable, or just a single file) use one of:
The last one is a shortcut for At this point you should already get some compilation errors. After modifying the file, use
to re-typecheck just the current file. If the file typechecks you can move the cursor onto an identifier and use the command
You should see something like this, which is the (instantiated) type of the identifier at the point:
Have a look at
DiscussionFor discussions about Scion use the scion-lib-devel mailing list. HackingThe main repository for Scion is hosted on Github. Get it via
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. BuildingFor development it is probably easier to use the GNU Make than Cabal
directly. The makefile includes a file called
After that, the makefile takes care of the rest.
Using an in-place GHCGHC 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
LicenseThe parts of Scion written in Haskell are licensed under the BSD license. The Emacs lisp parts are licensed under the GPL license version 2 or (at your option) any later version. Known PitfallsIf you get an error message like this: "scion_server: mkTopLevEnv: not interpreted main:Main" then you should rm [Ss]etup.hi [Ss]etup.o in the project directory. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论