Alejandro Serrano
871f72fca4
Remove code with extensions not present < ghc 7.8
2014-06-27 19:32:05 +02:00
Alejandro Serrano
edfe0c8ef3
Cleaning of case splitting code
2014-06-27 19:06:20 +02:00
Alejandro Serrano
2ab6991d95
Move code to new FillSig module
...
- Clean up a lot of code
2014-06-27 18:38:15 +02:00
Alejandro Serrano
3ef1979f67
Case splitting works in Emacs!
2014-06-26 21:17:22 +02:00
Alejandro Serrano
40cd5b7deb
Haskell part of case splitting working!
2014-06-25 18:09:24 +02:00
Alejandro Serrano
5fa536714f
Initial code generation working
...
- Added fallback with haskell-src-exts
2014-06-22 18:03:34 +02:00
Alejandro Serrano
90abb89a98
Inserting instance initial body now works :)
2014-06-22 11:10:23 +02:00
Alejandro Serrano
a45fb4c6f5
Move case split and sig. generation to own files
...
- Created SrcUtils module for shared functionality
2014-06-21 11:38:44 +02:00
Alejandro Serrano
8c56d2e3c8
Obtain better information for case split
2014-06-18 21:01:22 +02:00
Alejandro Serrano
5a968225c3
Initial skeleton for case split in elisp
2014-06-17 18:15:36 +02:00
Alejandro Serrano
8a63ae078b
Add missing cases for signatures
2014-06-16 22:10:01 +02:00
Alejandro Serrano
585c28f928
Initial implementation of instance completion
2014-06-11 22:01:43 +02:00
Alejandro Serrano
323c1b5471
Initial support for adding body from signature
2014-06-10 21:34:05 +02:00
Alejandro Serrano
cedf59ace7
Merge branch 'fix-typed-holes'
2014-06-10 17:09:46 +02:00
Alejandro Serrano
2f42d77b53
Add special cases for case splitting
2014-06-09 13:01:47 +02:00
Alejandro Serrano
c9b901f4f9
Fix problems with GHC's Typed Holes
2014-06-09 10:30:33 +02:00
Alejandro Serrano
0c445aa30f
Work on case split variable naming
2014-06-08 14:23:06 +02:00
Alejandro Serrano
6854d417c0
Initial implementation of case splitting
...
- It doesn't handle vars correctly yet
2014-06-08 12:33:13 +02:00
Daniel Gröber
241c7946fc
Revert "Fix tests for Cabal <= 1.16"
...
The problem the reverted commit tried to fix seems to have been just a
symptom of another root cause that was later fixed as the problem does
not seem to occur anymore even without this changeset also this
changeset broke cabal sandboxes with ghc < 7.8.
Fix #262
This reverts commit 8741323f5b
.
Conflicts:
Language/Haskell/GhcMod/GhcPkg.hs
2014-05-19 01:27:35 +02:00
Kazu Yamamoto
fcc3b46415
defining C macro if not defined.
2014-05-16 09:27:23 +09:00
Daniel Gröber
814ea60552
Types
doesn't export convert
anymore
2014-05-14 20:55:54 +02:00
Daniel Gröber
8324dd96ae
Don't expose Convert
2014-05-14 18:54:56 +02:00
Daniel Gröber
80e2761f2f
Ghc->GhcMod: finish Browse, Check
2014-05-14 18:05:40 +02:00
Daniel Gröber
ebfb740a2e
Move convert
to it's own module.
2014-05-14 17:06:30 +02: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
Kohei Suzuki
ef375668d1
Suppress empty line
2014-05-11 00:30:02 +09:00
Daniel Gröber
96a85fe953
Copy readMaybe/readEither from base >= 4.7 for backwards compatibility
2014-05-10 13:43:46 +02:00
Daniel Gröber
5492f0c5d1
Add license headers for code copied from Cabal
2014-05-10 13:43:27 +02:00
Daniel Gröber
f949e4be7a
Copy ComponentLocalBuildInfo from Cabal-1.18
...
This way `configDependencies` works even when the Cabal version used by
cabal-install is later than the one used by ghc-mod.
2014-05-10 02:04:09 +02:00
Daniel Gröber
13930a9d7d
Fix Cabal >= 1.18
2014-05-09 21:12:52 +02:00
Daniel Gröber
175635505d
Fix warnings
2014-05-09 20:44:33 +02:00
Daniel Gröber
8741323f5b
Fix tests for Cabal <= 1.16
2014-05-09 20:37:15 +02:00
Daniel Gröber
d1da6ab289
Make getSystemLibDir use GHC.Paths
instead of running ghc
2014-05-09 20:36:20 +02:00
Daniel Gröber
b8f9498f83
Fix reading of older Cabal setup-config
s
2014-05-09 20:35:13 +02:00
Kazu Yamamoto
2e3b172b0e
enabling -fno-warn- ( #246 ).
2014-05-09 23:45:34 +09:00
Daniel Gröber
fae4730ba5
Import HscTypes (HscEnv) with ghc <= 7.2
2014-05-08 13:14:44 +02:00
Daniel Gröber
a7b2c86985
Fall back to Cabal 1.16 format on runtime if extracting fails
2014-05-08 12:59:52 +02:00
Daniel Gröber
4c93819da8
Fix ghc-7.8
2014-05-08 11:50:51 +02:00
Daniel Gröber
7b8540add1
Add support for getting pkgDeps with Cabal <= 1.16
2014-05-08 11:32:40 +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
Kazu Yamamoto
8561e7b656
To break cyclic import, this patch makes GhcPkg.hs
independent from Monad.hs
(refactoring for #244 )
...
This removes `ghcPkgList`, `ghcPkgListEx` and `ghcPkgDbOpt`. I'm not sure
this is a right way to do.
2014-05-08 12:42:45 +09:00
Kazu Yamamoto
f199ea9e2e
removing warnings.
2014-05-08 10:49:40 +09:00
Daniel Gröber
5044cf7f56
Fix warnings
2014-05-05 09:43:14 +02:00
Daniel Gröber
635830b527
Fix #242 , ghcPkgList(Ex) on NixOS
2014-05-05 00:29:10 +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
Daniel Gröber
096a56e660
Hide catch
from Prelude
2014-05-04 04:57:38 +02:00
Daniel Gröber
4e4d27e62d
Use componentsConfigs
instead of configDependencies
...
`configDependencies` was added in Cabal-1.20 but we're using 1.18 on travis.
2014-05-04 04:57:38 +02:00
Daniel Gröber
9d9f66e942
Remove Maybe
from cabalConfigDependencies
and fromInstalledPackageId
2014-05-04 04:57:38 +02:00
Daniel Gröber
0c859294a3
Parse cabal setup-config
to get depencencies
2014-05-03 15:36:10 +02:00
Daniel Gröber
19b56738c6
Add withDirectory_
to Utils
2014-05-03 15:36:10 +02:00
Daniel Gröber
aec46dbd51
Factor out readProcess'
2014-05-03 15:36:10 +02:00
Daniel Gröber
77605c6daf
Add fromInstalledPackageId
2014-05-03 15:36:10 +02:00
Kazu Yamamoto
14f5768c90
doc.
2014-04-30 10:51:34 +09:00
Kazu Yamamoto
186485577d
bootInfo as API.
2014-04-30 10:49:25 +09:00
Kazu Yamamoto
d007fa817a
better names.
2014-04-28 21:59:54 +09:00
Kazu Yamamoto
a1aa44bdbb
doc.
2014-04-28 21:51:39 +09:00
Kazu Yamamoto
913fb72911
ErrMsg -> Logger.
2014-04-28 21:47:08 +09:00
Kazu Yamamoto
0155cf5e5f
style.
2014-04-28 21:43:24 +09:00
Kazu Yamamoto
d68690bab0
removing LogReader.
2014-04-28 21:41:29 +09:00
Kazu Yamamoto
411a584bb8
using check finally.
2014-04-28 16:31:28 +09:00
Kazu Yamamoto
9bc25046e3
rescue old GHCs.
2014-04-28 14:36:55 +09:00
Kazu Yamamoto
ae75872638
fixing regression.
2014-04-28 14:36:46 +09:00
Kazu Yamamoto
662842a085
clean up Gap.
2014-04-28 14:13:25 +09:00
Kazu Yamamoto
adb4addd54
707 -> 708.
2014-04-28 14:04:18 +09:00
Kazu Yamamoto
fc570551a2
withLogger handles errors.
2014-04-28 13:52:28 +09:00
Kazu Yamamoto
000076223f
removing the third argument from initializeFlagsWithCradle.
2014-04-28 13:00:25 +09:00
Kazu Yamamoto
117d01a52a
removing -Wall and -w:.
2014-04-28 12:52:09 +09:00
Kazu Yamamoto
f413cda0fe
one more try.
2014-04-28 11:26:06 +09:00
Kazu Yamamoto
6a7955679a
rescue old GHCs.
2014-04-28 09:28:57 +09:00
Kazu Yamamoto
2733f94a52
rescue old GHCs.
2014-04-28 09:00:03 +09:00
Kazu Yamamoto
017d4cc22f
don't use InteractiveImport for old GHCs..
2014-04-27 22:48:24 +09:00
Kazu Yamamoto
dede115731
defining withContext.
2014-04-27 21:26:03 +09:00
Kazu Yamamoto
64365807f9
refactoring.
2014-04-26 23:03:50 +09:00
Kazu Yamamoto
98d3c7028c
refactoring.
2014-04-26 22:51:29 +09:00
Kazu Yamamoto
9c7c6a5cf9
refactoring.
2014-04-26 21:59:06 +09:00
Kazu Yamamoto
6b63cb7098
doc.
2014-04-26 20:24:47 +09:00
Kazu Yamamoto
c45415a367
cleaning up check, splice flag and logger.
2014-04-26 17:54:15 +09:00
Kazu Yamamoto
74cde29ae0
refactoring setTargetFiles.
2014-04-26 14:38:49 +09:00
Kazu Yamamoto
c1c0993b4a
import DynFlag only in Gap.
2014-04-26 13:21:22 +09:00
Kazu Yamamoto
c8fbdcfa2f
Thanks to DeferTypeErrors, info/type can work even if the file contains errors.
2014-04-26 11:43:30 +09:00
Kazu Yamamoto
66a5123f8c
rescue old Cabal which does not support bench.
2014-04-26 09:22:42 +09:00
Daniel Gröber
8ac39a3378
Add benchmarks to cabalAllBuildInfo
2014-04-25 20:48:20 +02:00
Kazu Yamamoto
f50e5229c4
NG contains an error.
2014-04-25 11:08:29 +09:00
Kazu Yamamoto
13c5c2c5af
doc.
2014-04-24 22:11:06 +09:00
Kazu Yamamoto
6cca65b11e
ghc-mod find ( #203 ).
2014-04-24 21:08:45 +09:00
Kazu Yamamoto
390c509144
find functions went to lib.
2014-04-24 17:02:50 +09:00
Kazu Yamamoto
4074c3d751
error handling for modules.
2014-04-24 12:51:43 +09:00
Kazu Yamamoto
93dadfef44
error handling for browse.
2014-04-24 12:45:47 +09:00
Kazu Yamamoto
2d1133ea8e
exporting necessary types.
2014-04-24 12:17:50 +09:00
Kazu Yamamoto
e49fef6765
setTargetFiles now loads files.
2014-04-24 12:15:59 +09:00
Kazu Yamamoto
0c1469e53c
<package>:<module> style.
...
refactoring for #159 .
2014-04-24 11:26:30 +09:00
Kazu Yamamoto
79946f9a3d
removing withGHCDummyFile.
2014-04-23 16:37:24 +09:00
Kazu Yamamoto
3b3b767556
Merge branch 'dev-dynflags' of https://github.com/DanielG/ghc-mod into DanielG-dev-dynflags
...
Conflicts:
Language/Haskell/GhcMod/GHCApi.hs
2014-04-23 12:20:18 +09:00
Kazu Yamamoto
44ece2dcb9
Merge branch 'master' of github.com:kazu-yamamoto/ghc-mod
2014-04-23 12:04:00 +09:00
Daniel Gröber
c9ca3a6d76
Clean up DynFlags initialization
2014-04-23 04:04:41 +02:00
Daniel Gröber
dc43d600dc
Remove Alternative class constraint from withGhc
2014-04-23 03:43:53 +02:00