kazu-yamamoto/ghc-mod — pull request #299 by serras (2014-08-03 17:23:05+00:00)
Title: Automatic completion using Djinn

This is another pull request as part of my Google Summer of Code project.

This pull request adds a new command `auto` (in Emacs, `C-c C-a`) which using the [Djinn](http://hackage.haskell.org/package/djinn) core provides possible autocompletions for a hole. For example, if the user types

```
f :: (a,a) -> Maybe a
f (x,y) = _
```

the system shows as possible completions `Nothing`, `Just x` and `Just y`.

The pull request adds a new `auto` command to `ghc-mod` and `ghc-modi`, and a rich Emacs interface. In case that more than one completion is possible, they are shown in a new buffer, and the user can select and click with the mouse one of them, which is then added to the original text.

**Note:** this pull request adds a dependency on packages `djinn-lib` and `djinn-ghc` which provide much of the code in an independent way, to enhance further reuse. `djinn-lib` is just a fork of the original `djinn` package which is ensured to build in modern GHC. If needed, the code in `djinn-ghc` can be merge in `ghc-mod` without further problems.