Commit Graph

182 Commits

Author SHA1 Message Date
Daniel Gröber
3b5b9f8fcf Expose Language.Haskell.GhcMod.Monad 2014-05-04 04:57:38 +02:00
Daniel Gröber
c50b4f5a38 ghc-mod deserves it's own monad
Having to call `findCradle` and `initializeFlagsWithCradle` everywhere
we interact with ghc-mod's API doesn't seem very Haskell-like to me I
think we should provide a Monad that has a run function that already
does all those tedious tasks for us.

The `GhcMod` monad is basically a wrapper around `RWST r w s IO` with an
instance for `GhcMonad`

Having a `Reader` allows us to pass `Options` to runGhcMod and not have
to worry about passing it everywhere, `Cradle` is also stored in the
reader environment on initialization.

Writer and State are just there for future use.

I've included a `toGhcMod` function that turns a `Ghc a` into a `GhcMod
a` this will make it easy to transition everyting to using the `GhcMod`
monad instead of `Ghc` without breaking the build or test suite for
extended periods of time.

Conflicts:
	ghc-mod.cabal
2014-05-04 04:57:38 +02:00
Daniel Gröber
77605c6daf Add fromInstalledPackageId 2014-05-03 15:36:10 +02:00
Daniel Gröber
6ad386d31e Add test data to Extra-Source-Files 2014-05-03 15:35:04 +02:00
Daniel Gröber
1c27e9ec4e Bump hspec dependency, should fix #236
`hspec-discover --no-main` was introduced in 1.8.2
2014-05-01 01:31:32 +02:00
Kazu Yamamoto
186485577d bootInfo as API. 2014-04-30 10:49:25 +09:00
Kazu Yamamoto
913fb72911 ErrMsg -> Logger. 2014-04-28 21:47:08 +09:00
Kazu Yamamoto
d2a92529fc fixing deps. 2014-04-24 22:30:18 +09:00
Kazu Yamamoto
4011826a6b ver bumps up. 2014-04-24 22:22:23 +09:00
Kazu Yamamoto
390c509144 find functions went to lib. 2014-04-24 17:02:50 +09:00
Kazu Yamamoto
bd34db1b07 using force just in case. 2014-04-22 13:32:33 +09:00
Kazu Yamamoto
1006cd4eec APIs in Ghc monad now go to GHCMod.Ghc. 2014-04-21 12:51:56 +09:00
Kazu Yamamoto
064e4af236 creating src/Boot.hs. 2014-04-21 11:57:14 +09:00
Kazu Yamamoto
ab5e082e81 --quiet back (#226). 2014-04-19 08:26:30 +09:00
Kazu Yamamoto
aecb9bc1e4 implementing suppressStdout/err. 2014-04-18 15:41:32 +09:00
Daniel Gröber
1639a7b2e0 Bring spec up to speed 2014-04-18 04:00:01 +02:00
Daniel Gröber
be4172b454 Add cabal.sandbox.config.in to Extra-Source-Files 2014-04-15 17:13:55 +02:00
Daniel Gröber
30b8366526 Refactor the way packages databases are handled
- cradle now stores a list of active package databases instead of only
  the user store (if present).

- rename `cradlePackageDb` -> `cradlePkgDbStack` as that`s what the ghc
  documentaion calls this kind of thing

- `getPackageDbPackages` now returns names of all visible packages in
  the given directory. Also the implementation now uses `ghc-pkg`
  instead of manually looking at the package database
2014-04-15 05:15:50 +02:00
Kazu Yamamoto
e537624e65 ver bumps up. 2014-04-07 15:04:27 +09:00
Kazu Yamamoto
172645aa9f ver bumps up. 2014-04-03 10:02:04 +09:00
Kazu Yamamoto
f959a8029e ver bumps up. 2014-03-31 11:01:32 +09:00
Kazu Yamamoto
657a007b47 a new module. 2014-03-27 16:23:15 +09:00
Kazu Yamamoto
8238c632a8 using Data.Map if containers is old.
hoping passing travis tests.
2014-03-26 15:23:12 +09:00
Kazu Yamamoto
5c79376ca7 containers >= 0.5 for Data.Map.Strict. 2014-03-26 12:00:36 +09:00
Kazu Yamamoto
dc6424454e ghc-insert-module now uses ghc-modi. 2014-03-25 14:29:18 +09:00
Kazu Yamamoto
b40f162979 adding ghc-modi. 2014-03-19 10:23:47 +09:00
Kazu Yamamoto
dd7b7b8305 the first step to make ghc-mod independent from GHC's version. 2014-03-17 16:58:55 +09:00
Kazu Yamamoto
16e050439d removing fast/slow code. 2014-03-17 15:56:00 +09:00
Kazu Yamamoto
5aa5d3cbca ver bumps up. 2014-03-15 10:10:10 +09:00
Kazu Yamamoto
0fac26e350 hlint min version. 2014-03-13 11:10:37 +09:00
Kazu Yamamoto
68447e3681 ver bumps up. 2014-02-07 09:46:18 +09:00
Kazu Yamamoto
dc4cd66964 ver bumps up. 2014-01-14 11:59:33 +09:00
Kazu Yamamoto
a34f9a24be workaround for the next HP. 2014-01-08 12:01:10 +09:00
Kazu Yamamoto
e416529ede ver bumps up. 2013-11-20 14:55:27 +09:00
Kazu Yamamoto
beaf3c0a4e layout only. 2013-11-19 10:43:27 +09:00
Kazu Yamamoto
c37303a08e dep switch for convertible (#161). 2013-11-19 10:37:11 +09:00
Kazu Yamamoto
1fcaf5f34e ver bumps up. 2013-10-07 16:49:31 +09:00
Kohei Suzuki
b0f20ffb04 Support GHC < 7.6.0 which doesn't have getExecutablePath 2013-10-05 12:19:30 +09:00
Kazu Yamamoto
1a6413cd2f ver bumps up. 2013-09-28 10:53:40 +09:00
Kazu Yamamoto
c570c5b689 ver bumps up. 2013-09-21 18:46:03 +09:00
Kazu Yamamoto
1050ea3c63 more tests. 2013-09-21 15:32:22 +09:00
Kazu Yamamoto
ca28a56037 ver bumps up. 2013-09-21 05:52:56 +09:00
Kazu Yamamoto
6bbe9e5df9 add doctest. 2013-09-20 21:10:31 +09:00
Kazu Yamamoto
5b5c663990 ver bumps up. 2013-09-16 12:07:03 +09:00
Kazu Yamamoto
2dd1772146 ver bumps up. 2013-09-16 11:23:02 +09:00
Kazu Yamamoto
024b6b3200 ver bumps up. 2013-09-06 14:23:21 +09:00
Kazu Yamamoto
ce5056fcda updating Extra-Source-Files. 2013-09-06 13:52:56 +09:00
Kazu Yamamoto
8e60864a34 ver bumps up. 2013-09-04 15:02:20 +09:00
Kazu Yamamoto
cd3e4989e1 ver bumps up. 2013-09-03 11:59:24 +09:00
Kazu Yamamoto
77769e95ce reverting convertible dep. 2013-09-03 11:58:23 +09:00