Go to file
Daniel Gröber 037006383d Merge pull request #872 from maximbaz/do-not-log-warning-stack-project
Do not log warning when Stack project is preferred
2017-02-28 03:13:20 +01:00
bench Add a criterion benchmark 2016-07-18 02:06:00 +02:00
core/Language/Haskell/GhcMod Do not log warning when Stack project is preferred 2017-02-26 19:40:45 +01:00
Data/Binary Cleanup some redundant constraint warnings 2016-05-22 02:53:51 +02:00
doc Update MELPA URL 2015-11-01 13:57:14 +00:00
elisp Redirect error ouput in `ghc-run-ghc-mod' 2016-08-08 15:51:49 +02:00
GhcModExe Fix build on case-insensitive filesystems (#873) 2017-02-28 03:01:14 +01:00
hackage-metadata hackage-meta: Fix 5.6 dependencies 2016-11-02 00:48:24 +01:00
NotCPP some GHC 8.0.1 fixes 2016-05-18 17:58:34 +02:00
scripts hackage-meta: update upload script 2016-11-02 00:48:51 +01:00
src Fix build on case-insensitive filesystems (#873) 2017-02-28 03:01:14 +01:00
System/Directory NFData fix for ClockTime on GHC 7.4 2016-01-09 17:59:57 +03:00
test Prepare for splitting off ghc-mod-core eventually 2017-01-12 17:05:47 +01:00
test-elisp adding test cases for elisp. 2014-04-23 14:51:02 +09:00
.ghci .ghci for ghci-friendliness (testing) 2012-01-22 20:16:22 -08:00
.gitignore Gitingore test project stack.yaml 2016-08-28 23:19:12 +03:00
.gitlab-ci.yml Add .gitlab-ci.yml 2017-01-16 10:35:00 +01:00
.travis.yml [Travis] Add doctest 2016-08-09 15:06:24 +03:00
CodingStyle adding CodingStyle. 2014-08-12 15:00:56 +09:00
COPYING.AGPL3 Change primary license to AGPL-3 2015-03-03 21:09:18 +01:00
COPYING.BSD3 Change primary license to AGPL-3 2015-03-03 21:09:18 +01:00
ghc-mod.cabal Fix build on case-insensitive filesystems (#873) 2017-02-28 03:01:14 +01:00
GhcMod.hs Fix build on case-insensitive filesystems (#873) 2017-02-28 03:01:14 +01:00
ghcmodHappyHaskellProgram-Dg.tex Update HCAR entry 2015-10-29 23:43:02 +01:00
LICENSE Add back LICENSE file pointing to COPYING.* 2015-03-05 17:35:29 +01:00
README.md Minor README update [ci skip] 2017-01-23 00:36:57 +01:00
Setup.hs Setup.hs: remove useless stuff 2016-09-07 23:40:34 +02:00
SetupCompat.hs Setup.hs: remove useless stuff 2016-09-07 23:40:34 +02:00
Utils.hs Fix upper bounds on binary for ghc<7.10 2015-11-26 14:52:25 +01:00

ghc-mod: Happy Haskell Hacking

build status

ghc-mod is a couple of different things depending on what you want to do, you should read the corresponding section:

Overview

Using ghc-mod in your Development Environment

To use ghc-mod in your development environment of choice you need two things:

  • The ghc-mod program included in the package of the same name, see Installing
  • A ghc-mod frontend to integrate it into your development environment, see Frontend

Using ghc-mod as an IDE Backend Program

Directly using ghc-mod is while still supported for the time being discouraged. You should look into working with haskell-ide-engine instead.

The ghc-mod backend program is somewhat crusty and carries a lot of legacy baggage so going forward we would like to see frontends use haskell-ide-engine instead. There we're trying to get the design right from the beginning and fix the fragmentation of the Haskell Tooling Ecosystem along the way.

Using ghc-mod as a Library

Internally ghc-mod uses the Glasgow Haskell Compilers's API to implement most of it's functionality.

In order to provide a hassle free experience to users ghc-mod tries hard to automatically, and correctly, detect and if needed tweak the environment GHC needs. It also handles some of the more cumbersome parts of getting a working compiler session up and running.

This functionality can be very useful to all kinds of Haskell development tools therefore want to expose all the useful abstractions ghc-mod provides.

Right now the ghc-mod API is pretty messy a result major internal rewrites and reorganization coupled with too little time for cleanups over the course of almost 100 releases! We would like to make a cut during v6.0 or so and completely re-do the API but we need more input from downstream tool writers to do that properly, see Library API Redesign.

Right now tools like The Haskell Refactorer (HaRe) use this environment handling so they can concentrate on their core functionality instead of worrying about environments.

Most recently the haskell-ide-engine project has sprung up and if you're planning to write any kind of tool that needs editor integration eventually you should definetly look into that. haskell-ide-engine uses ghc-mod at it's core so you'll want to be familliar with it either way.

API "documentation" is here: Hackage docs.

IRC

If you have any problems, suggestions, comments swing by #ghc-mod (web client) on Freenode. If you're reporting a bug please also create an issue here so we have a way to contact you if you don't have time to stay.

Do hang around for a while if no one answers and repeat your question if you still haven't gotten any answer after a day or so. You're most likely to get an answer during the day in GMT+1.