Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Hi! I cleaned up your code for you! #13

Open
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+89 −89
Split
View
@@ -5,7 +5,7 @@ works or should work.
- [GHC API Haddock documentation][ghc-api]
- [Hoogle][] for everything else
-
+
[ghc-api]: http://www.haskell.org/ghc/docs/latest/html/libraries/ghc/index.html
[Hoogle]: http://www.haskell.org/hoogle/
@@ -14,7 +14,7 @@ works or should work.
## GHC Session State
* **Static Flags**: We cannot change these throughout a session.
-
+
* **Dynamic Flags**: May be set on a per-file basis and a per-project
basis. They contain all sorts of stuff including search paths and
more. The tricky bit here is resetting the old DynFlags when
@@ -28,7 +28,7 @@ works or should work.
* **Interactive Context**: The context (set of visible modules and
debugger state) of the byte code interpreter.
-
+
## Scion Session State
What we really need is some kind of abstraction of the GHC session
@@ -62,7 +62,7 @@ of setting up the information that makes up the GHC session state.
The first case is obvious. The second case may be triggered both
when switching components within the same Cabal project, or when
re-opening a project that we have been working on previously.
-
+
### Configuring a Cabal project
In addition to the Cabal file to configure, we also need
@@ -75,7 +75,7 @@ In addition to the Cabal file to configure, we also need
so anyone using Scion only needs to edit the global file once.
* Command line flags to the `configure` command.
-
+
In the future we could provide a mechanism to put this information in
a special file, so the user does not have to provide this information
over and over again.
View
@@ -7,14 +7,14 @@ modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
-
+
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
-
+
- Neither name of the author nor the names of its contributors may be
used to endorse or promote products derived from this software without
-specific prior written permission.
+specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) AND THE CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
View
@@ -24,7 +24,7 @@ To install the library and server use:
$ cd dir/to/scion
$ cabal install
-
+
This will install the executable `scion_server` in the `bin` directory
of `cabal-install`, typically `$HOME/.cabal/bin`.
@@ -115,7 +115,7 @@ something like the following to your `.emacs`:
Once you have a running and connected Scion server, you can use the
commands provided by scion-mode:
-
+
* `C-c C-x C-l` (`scion-load`) load the current file with Scion. If
the file is within a Cabal project this will prompt to use the
settings from one of the components in the package description
@@ -141,15 +141,15 @@ The following commands offer completion for a few things.
* `C-c i l` (`haskell-insert-language`) asks for a `LANGUAGE` pragma
and adds it to the top of the file.
-
+
* `C-c i p` (`haskell-insert-pragma`) inserts a pragma at the
current cursor position. (At the moment this doesn't try to make
sense of the selected pragma, however.)
-
+
* `C-c i m` (`haskell-insert-module-name`) inserts the name of an
external module (external), i.e., a module _not_ from the current
package.
-
+
* `C-c i f` (`haskell-insert-flag`) insert (GHC) command line flag
at point. (Really only makes sense within an `OPTIONS_GHC` pragma.)
@@ -172,7 +172,7 @@ The following should work most of the cases.
Calling this command on `+` will print `Int -> Int -> Int` instead
of `Num a => a -> a -> a`.
-
+
# Manually Connecting to Scion
If you set the variable `scion-auto-connect` to `'ask` (the default is
@@ -184,7 +184,7 @@ You can start the server manually on the command line and then use
M-x scion-connect
to connect to that server. However, most of the time it will be more
-convenient to start the server from within Emacs:
+convenient to start the server from within Emacs:
M-x scion
@@ -216,7 +216,7 @@ different Vim versions). If Vim should start the Scion server itself
" recommended: vim spawns a scion instance itself:
let g:scion_connection_setting = [ 'scion', "<path/to/scion-server>"]
-
+
Note that there may be problems using "~" in the path, so better
specify the absolute path.
@@ -275,10 +275,10 @@ You should see something like this, which is the (instantiated) type
of the identifier at the point:
{'Just': 'print :: [Char] -> IO ()'}
-
+
Have a look at `vim_runtime_path/ftplugin/haskell.vim` to see a list of all
commands which are implemented yet.
-
+
`BackgroundTypecheckFileScion` should be called automatically after
buf write. If you don't like this set `g:dont_check_on_buf_write` or
overwrite `g:haskell_qf_hook` to change open/close quickfix and jump to
@@ -6,15 +6,15 @@ caches some of their state). This solves the following problems:
- *Static Flags*. Some of GHC's command line flags can only be set
on start-up. This is important mainly for flags that control the
kind of compilation (profiled, threaded).
-
+
- *Other write-once state*. GHC only reads the package database once
on startup. If new packages have been installed since startup
they will not be visible. Changing the database by force while a
session is running is likely to cause problems.
-
+
- *Caches*. There are a few caches in GHC that cannot be flushed.
These include the name cache, and the package DB cache.
-
+
- *Multiple Compiler Versions*. It is not possible to link to two
different versions of GHC from within the same program. If we
want to make sure a program compiles with multiple versions of GHC
@@ -30,7 +30,7 @@ this, we:
- cache some information on the library side, and
- avoid sending too much data between library and worker.
-
+
Non-Haskell front-ends use a scion-server that takes the place of the
library.
Oops, something went wrong.