Daniel Gröber
f5d051dcef
Remove toGhcModT
it's not needed anymore.
2014-08-15 20:35:21 +02:00
Kazu Yamamoto
d5733874e0
using <$>
2014-08-14 11:14:46 +09:00
Kazu Yamamoto
2875275fc0
hlint suggestions.
2014-08-14 11:11:02 +09:00
Daniel Gröber
ec1b115cc1
In check
, apply ghcUserOptions after setting -Wall
2014-08-13 19:28:08 +02:00
Daniel Gröber
c1c7dcec20
Rename ghcOpts
-> ghcUserOptions
2014-08-13 19:28:08 +02:00
Daniel Gröber
0fa870efa6
Fix ghc<=7.6
2014-08-12 18:54:48 +02:00
Daniel Gröber
edeb57a6a4
note
2014-08-12 18:24:39 +02:00
Daniel Gröber
fa65d7269e
Add a test for gmsGet/Put
2014-08-12 18:24:39 +02:00
Daniel Gröber
87c587993a
Make parseCabalFile
use MonadError
2014-08-12 18:24:39 +02:00
Daniel Gröber
e345c92edb
Make GhcModT's MonadState instance pass through
...
..to the underlying monad
2014-08-12 18:23:50 +02:00
Daniel Gröber
c0652c0321
Move GhcModError to Types.hs
2014-08-12 18:23:50 +02:00
Daniel Gröber
bd28310e59
Don't fall back to sandbox if cabal file failes to parse
2014-08-12 00:02:39 +02:00
Daniel Gröber
fad99f466f
Export GhcModError(..)
2014-08-06 20:40:11 +02:00
Daniel Gröber
cb28e9ec8f
Fix warning
2014-08-06 19:38:42 +02:00
Daniel Gröber
f311efd90c
Rework GhcModT monad stack
2014-08-06 19:38:42 +02:00
Daniel Gröber
0736516512
Document exposed parts of GhcMod.Monad
2014-07-21 00:27:12 +02:00
Kazu Yamamoto
30ddd655cd
export minimum Monad stuff from GhcMod.
2014-07-18 15:31:42 +09:00
Kazu Yamamoto
6d42354a5b
setMode and getMode
2014-07-18 14:55:21 +09:00
Kazu Yamamoto
7b079896b1
doc sectioning.
2014-07-18 14:55:08 +09:00
Kazu Yamamoto
233f4cf05e
moving setFlags to Gap.
2014-07-18 11:09:11 +09:00
Kazu Yamamoto
0ce70ae22d
set Opt_SpecConstr just in case.
2014-07-18 10:52:57 +09:00
Kazu Yamamoto
cffa7463eb
adopting hlint's suggestions.
2014-07-17 17:16:44 +09:00
Kazu Yamamoto
cf0df26560
Monad.hs is now exported by GhcMod.hs.
2014-07-17 14:30:42 +09:00
Kazu Yamamoto
49284a64be
Uses HscNothing and falls back to HscInterpreted if necessary ( #205 )
...
Two Test case are fails but it is not fatal.
2014-07-15 17:20:35 +09:00
Kazu Yamamoto
c87ea45488
adding #if to Monad.hs.
2014-07-15 14:45:41 +09:00
Kazu Yamamoto
a7a02a3f4c
Bringing back MaybeT
...
This brings back a warning to be fixed.
2014-07-15 12:49:12 +09:00
Kazu Yamamoto
1524d2a43e
removing warnings.
2014-07-15 12:10:18 +09:00
Daniel Gröber
686179f12b
Fix building with ghc < 7.8
2014-07-15 02:34:07 +02:00
Daniel Gröber
7474a1b652
Bring back GhcMod
but this time it's a GhcModT with an ErrorT inside
2014-07-15 01:04:06 +02:00
Daniel Gröber
f0bfcb8811
Use GhcModT everywhere and remove the GhcMod alias
...
Not doing this makes having GhcModT pretty pointless as users of the
library wouldn't be able to use custom inner monads as evey function for
dealing with GhcModT's would be constraint to (GhcModT IO) thus only
allowing IO as the inner monad.
2014-07-15 01:03:56 +02:00
Daniel Gröber
b6896a481a
Move initializeFlagsWithCradle
to Monad.hs
2014-07-12 03:33:04 +02:00
Daniel Gröber
d818a64f6f
whitespace
2014-07-11 04:51:27 +02:00
Daniel Gröber
320b2243a2
Make GhcMod a special case of GhcModT
...
i.e. turn GhcMod into a monad transformer
2014-07-11 04:51:11 +02:00
Daniel Gröber
4b6a687bc1
Migrate the remaining parts of the exposed API to GhcMod a
2014-07-11 03:13:38 +02:00
Daniel Gröber
dc5ba6d00d
Add newGhcModEnv for allowing multiple active sessions
...
Conflicts:
Language/Haskell/GhcMod/Monad.hs
2014-07-10 21:14:47 +02:00
Daniel Gröber
86a7f954e3
Add a comment discouraging the use of toGhcMod
in new code
2014-07-04 19:03:02 +02:00
Kazu Yamamoto
f2e20e3279
comments.
2014-07-03 14:26:39 +09:00
Kazu Yamamoto
640140608e
layout.
2014-07-03 14:22:43 +09:00
Kazu Yamamoto
826d42f824
clean up macros.
2014-07-03 14:19:36 +09:00
Kazu Yamamoto
c13fdde2f8
importing Control.Monad.IO.Class explicity.
...
trying to resolve #277 .
2014-07-03 12:50:46 +09:00
Kazu Yamamoto
fcc3b46415
defining C macro if not defined.
2014-05-16 09:27:23 +09:00
Daniel Gröber
f1535efcf2
Ghc -> GhcMod: Browse, Check
2014-05-14 17:06:29 +02:00
Daniel Gröber
e5c6d3e472
Start migrating Ghc -> GhcMod monad
2014-05-14 17:06:29 +02:00
Daniel Gröber
175635505d
Fix warnings
2014-05-09 20:44:33 +02:00
Daniel Gröber
fae4730ba5
Import HscTypes (HscEnv) with ghc <= 7.2
2014-05-08 13:14:44 +02:00
Kazu Yamamoto
b7d92417bc
HasDynFlags is provided after 7.6.
2014-05-08 17:01:01 +09:00
Kazu Yamamoto
cc3e728f03
fixing comment.
2014-05-08 16:51:15 +09:00
Daniel Gröber
61207c13d3
Add MonadIO instance for RWST
2014-05-08 08:36:18 +02:00
Daniel Gröber
ea427d60ba
note: MonadIO class
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