Commit Graph

270 Commits

Author SHA1 Message Date
Daniel Gröber
40f0e21fdf Fix input validation on log level 2015-08-05 06:16:05 +02:00
Daniel Gröber
c9b6e95a30 Add Vomit log level and dumping to disk 2015-08-03 08:09:24 +02:00
Daniel Gröber
f023d939e2 Fix GHC 7.10 warnings 2015-08-03 05:46:51 +02:00
Bodigrim
e252c7b762 Fix typo in help 2015-07-24 00:07:56 +03:00
Daniel Gröber
6dd1195b7f Merge remote-tracking branch 'sergv/master' 2015-06-02 12:30:15 +02:00
Sergey Vinokurov
7b6eb55b11 Transform ModuleString and Expression type synonyms into newtypes 2015-06-02 10:43:29 +03:00
Sergey Vinokurov
57e2c112dc Use package dbs defined by current cradle when dealing with SymbolDBs 2015-06-02 10:43:27 +03:00
NightRa
7b3a84bc74 Remove the data-default dependency 2015-05-28 00:22:04 +03:00
Daniel Gröber
f779a778fb spawnProcess doesn't exist before 7.8 2015-05-20 12:05:43 +02:00
Daniel Gröber
133ec67350 Fix command line parsing 2015-05-13 11:02:24 +02:00
Daniel Gröber
e202fabc39 elisp: Fix usage of legacy-interactive 2015-05-06 23:13:24 +02:00
Daniel Gröber
c1bdb2d52c Fix ghc-modi compat exe 2015-05-06 16:15:04 +02:00
Daniel Gröber
d9bc2092ab Remove dead code 2015-05-06 16:14:37 +02:00
Daniel Gröber
3c76ba412f Start rolling ghc-modi into the ghc-mod executable 2015-05-05 14:47:42 +02:00
Daniel Gröber
80d91776c5 Cleanup and some fixes 2015-03-28 19:13:48 +01:00
Daniel Gröber
3f8cfadeff Fix overlapping global/command flag -q 2015-03-10 09:24:33 +01:00
Daniel Gröber
baf5cad809 Pass through --with-* options to cabal-helper 2015-03-07 19:37:19 +01:00
Daniel Gröber
c05bd816e7 Add quiet option to decrease log level 2015-03-06 19:47:51 +01:00
Daniel Gröber
2151363dd6 Add back -d option to modules command 2015-03-05 19:38:18 +01:00
Daniel Gröber
bee3ec35ec exe:ghc-mod: some output formatting changes 2015-03-05 17:35:28 +01:00
Daniel Gröber
82bb0090c0 Refactoring to use cabal-helper-wrapper
This turned out to be quite involved but save for this huge commit it's
actually quite awesome and squashes quite a few bugs and nasty
problems (hopefully). Most importantly we now have native cabal
component support without the user having to do anything to get it!

To do this we traverse imports starting from each component's
entrypoints (library modules or Main source file for executables) and
use this information to find which component's options each module will
build with. Under the assumption that these modules have to build with
every component they're used in we can now just pick one.

Quite a few internal assumptions have been invalidated by this
change. Most importantly the runGhcModT* family of cuntions now change
the current working directory to `cradleRootDir`.
2015-03-05 17:35:24 +01:00
Daniel Gröber
52e3233f44 Introducing cabal-helper-wrapper
The idea here is to build cabal-helper with whatever version of Cabal
the user happens to be using (which we find by looking at
dist/setup-config) at runtime.

This way we can support literally any version of Cabal as long as the
actual cabal-helper still compiles.

I tried to only use interfaces in Cabal that have been there since at
least 1.16 so I'm hoping this shouldn't break too much.
2015-03-03 21:06:58 +01:00
Daniel Gröber
405b814726 Add cabal-helper for decoding Cabal-1.22 setup-configs
.. without having to worry about Cabal version conflicts
2015-02-08 12:43:35 +01:00
Daniel Gröber
2b4fd77c28 Add GHC-7.10 support 2015-02-08 12:43:35 +01:00
Daniel Gröber
0eaa3d23d8 Fix documentation for root command 2015-02-07 15:22:10 +01:00
Daniel Gröber
129fe92de2 Improve error reporting for invalid command line arguments 2015-02-07 15:22:10 +01:00
Daniel Gröber
76180ca73a "modules" command was missing from ghc-mod usage 2014-12-24 22:35:21 +01:00
Daniel Gröber
37af8e368d Refactoring World, etc. and fix #387 2014-11-02 01:19:27 +01:00
Daniel Gröber
ff75811a76 Start migrating ghc-modi code to src/GHCMod.hs 2014-10-30 01:11:10 +01:00
Daniel Gröber
9ac128aa6f Fix #387, Pattern match failure in GhcPkg 2014-10-30 01:10:56 +01:00
Daniel Gröber
dbe66cbaa3 Fix #386, ghc-mod version should not check cabal configure 2014-10-20 22:33:58 +02:00
Daniel Gröber
6e92f28f43 Fix #391, Error on command -g when used before command despite --help output saying this is valid 2014-10-18 21:55:59 +02:00
Daniel Gröber
ab7059d5e4 Merge remote-tracking branch 'upstream/no-set'
Conflicts:
	Language/Haskell/GhcMod/Find.hs
2014-10-03 21:39:20 +02:00
Kazu Yamamoto
c4929c54af getConfig runs "cabal configure" first if setup-config is invalid. 2014-09-23 21:28:03 +09:00
Kazu Yamamoto
7db266c22d adding World.hs. 2014-09-23 17:34:09 +09:00
Kazu Yamamoto
9974bcbf79 trying to fix travis ci. 2014-09-23 16:00:22 +09:00
Kazu Yamamoto
1545f05d87 prepareAutogen skips its work if a cabal file does not exist. 2014-09-23 15:14:46 +09:00
Kazu Yamamoto
dfbb9de8b5 CreateProcess hack for old GHCs. 2014-09-23 06:47:56 +09:00
Kazu Yamamoto
e3e95adeb6 generating "autogen/" if not exist (#326). 2014-09-22 22:38:15 +09:00
Kazu Yamamoto
7382e1bf1d Misc module for ghc-modi. 2014-09-22 21:32:57 +09:00
Kazu Yamamoto
6f814a4378 restart a GhcMod session if the cabal file is changed. 2014-09-22 14:13:07 +09:00
Kazu Yamamoto
e8988c2f02 ghc-modi's "find" now catches up if packageDb is updated. 2014-09-20 12:25:46 +09:00
Kazu Yamamoto
e66aefebee removing target file set from ghc-modi.
This prevents errors if a package has multiple targets and test suites.
But this is still fast enough.
2014-09-19 11:52:00 +09:00
Kazu Yamamoto
357694c6cc removing spaces. 2014-09-19 11:52:00 +09:00
Daniel Gröber
5a4bec8755 Rewrite ghc-mod command line frontend. 2014-09-18 10:45:14 +02:00
Daniel Gröber
a0289420f9 Cleanup ghc-mod help output 2014-09-16 05:45:20 +02:00
Kazu Yamamoto
35a9da34a0 Revert "removing spaces."
This reverts commit 986eedcc75.
2014-09-16 12:22:18 +09:00
Kazu Yamamoto
986eedcc75 removing spaces. 2014-09-16 12:03:12 +09:00
Rob Everest
2c2e7782d2 Use the cabal configuration flags where possible when finalizing the PackageDescription. 2014-09-12 13:15:05 +10:00
Ruben Astudillo
707427ee4d Merge remote-tracking branch 'kazu/master' 2014-08-28 18:02:07 -04:00
Daniel Gröber
a0ae09a3e6 Give readProcess' more sensible error messages.
Also a bunch of refactoring for GhcModError
2014-08-28 15:57:49 +02:00
Ruben Astudillo
bdaa2ec675 browseIt with modified environment to solve #265 2014-08-23 04:23:33 -04:00
Daniel Gröber
147dd90ee7 Remove dedicated exception handling in check completely
Exceptions are already caught at the top level so this is unnecessary.
2014-08-19 04:49:44 +02:00
Daniel Gröber
1b5917c70e Remove withErrorHandler, use liftExceptions instead 2014-08-19 04:30:44 +02:00
Daniel Gröber
271ff4e162 Catch cabal configure failure properly 2014-08-18 08:06:36 +02:00
Kazu Yamamoto
bc4bfe1752 -v option for ghc-mod (#304) 2014-08-14 12:03:59 +09:00
Daniel Gröber
c1c7dcec20 Rename ghcOpts -> ghcUserOptions 2014-08-13 19:28:08 +02:00
Daniel Gröber
f2ccea7f29 Fix error presentation 2014-08-13 19:28:08 +02:00
Kazu Yamamoto
625d4661e7 fix #295. 2014-08-13 15:21:13 +09:00
Daniel Gröber
f311efd90c Rework GhcModT monad stack 2014-08-06 19:38:42 +02:00
Alejandro Serrano
9161757f95 First attempt to add auto 2014-08-01 17:08:23 +02:00
Alejandro Serrano
6302d4882e Merge remote-tracking branch 'kazu/master'
Conflicts:
	Language/Haskell/GhcMod/Check.hs
	Language/Haskell/GhcMod/FillSig.hs
	Language/Haskell/GhcMod/GHCApi.hs
2014-07-18 17:12:52 +02:00
Kazu Yamamoto
30ddd655cd export minimum Monad stuff from GhcMod. 2014-07-18 15:31:42 +09:00
Kazu Yamamoto
e1d9c3b881 clean up lookupSymbol. 2014-07-18 15:13:30 +09:00
Kazu Yamamoto
cf0df26560 Monad.hs is now exported by GhcMod.hs. 2014-07-17 14:30:42 +09:00
Kazu Yamamoto
74e84e89ac deleting GhcMod.Ghc. 2014-07-17 14:04:28 +09:00
Alejandro Serrano
b21fa674ea Merge remote-tracking branch 'kazu/master' 2014-07-17 06:59:29 +02:00
Alejandro Serrano
c3722f7a20 Include 'refine' again 2014-07-17 06:59:10 +02:00
Kazu Yamamoto
a6f08fe79f setupDB is now IO. 2014-07-17 12:25:10 +09:00
Kazu Yamamoto
cee1b83daa the first step to create SymbolDB via a file. 2014-07-17 11:57:19 +09:00
Alejandro Serrano
57bd408785 Merge remote-tracking branch 'kazu/master'
Conflicts:
	Language/Haskell/GhcMod.hs
	Language/Haskell/GhcMod/Check.hs
	Language/Haskell/GhcMod/FillSig.hs
	Language/Haskell/GhcMod/GHCApi.hs
	Language/Haskell/GhcMod/Ghc.hs
	src/GHCMod.hs
2014-07-16 19:01:43 +02:00
Alejandro Serrano
49437d82d9 Initial work on refining variable 2014-07-16 18:20:52 +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
56ad1a3c8c Control.Monad.Trans.MonadIO -> CoreMonad.MonadIO
they are different before ghc 7.8
2014-07-11 04:12:05 +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
Alejandro Serrano
1b66f65b48 Move lots of stuff to GhcMod
- Generalize many signatures to GhcMonad m
2014-06-28 21:43:51 +02:00
Alejandro Serrano
323c1b5471 Initial support for adding body from signature 2014-06-10 21:34:05 +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
Sami Niiranen
4037f5f8e1 Refactor error message for argument mismatch to be more generic
Previously an insufficient amount of arguments to e.g. the 'type' utility resulted in a "Too many arguments" feedback, which can be somewhat confusing. Now if the argument count does not match, a more generic error message is shown.
2014-05-18 10:53:32 +03: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
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
Kazu Yamamoto
186485577d bootInfo as API. 2014-04-30 10:49:25 +09:00
Kazu Yamamoto
bb8df8cbdf bootInfo uses boot. 2014-04-30 10:39:39 +09:00
Kazu Yamamoto
411a584bb8 using check finally. 2014-04-28 16:31:28 +09:00
Kazu Yamamoto
bb38a930e7 removing imports. 2014-04-28 14:45:43 +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
ca6ca23aa7 doc. 2014-04-28 09:29:24 +09:00
Kazu Yamamoto
9c7c6a5cf9 refactoring. 2014-04-26 21:59:06 +09:00
Kazu Yamamoto
8142ccbc64 refactoring. 2014-04-26 21:46:11 +09:00
Kazu Yamamoto
c45415a367 cleaning up check, splice flag and logger. 2014-04-26 17:54:15 +09:00
Kazu Yamamoto
abc660cdfe showing GHC version. 2014-04-25 22:03:09 +09:00
Kazu Yamamoto
549d33d492 version command for ghc-mod/ghc-modi. 2014-04-25 14:09:32 +09:00
Kazu Yamamoto
f50e5229c4 NG contains an error. 2014-04-25 11:08:29 +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
3059a295dc comment. 2014-04-24 12:53:14 +09:00
Kazu Yamamoto
0c1469e53c <package>:<module> style.
refactoring for #159.
2014-04-24 11:26:30 +09:00
Kazu Yamamoto
2e06c2f938 doc update. 2014-04-23 22:57:29 +09:00
Kazu Yamamoto
3ea98737b1 better error handling. 2014-04-23 14:44:05 +09:00
Kazu Yamamoto
d23f57e1b6 rescuring GHC 7.2.2. 2014-04-23 12:47:52 +09:00
Kazu Yamamoto
bd34db1b07 using force just in case. 2014-04-22 13:32:33 +09:00
Kazu Yamamoto
6f9ceb94e2 giving up loading Data.ByteString. 2014-04-21 20:36:16 +09:00
Kazu Yamamoto
334283a4cf ghc-modi browse. 2014-04-21 17:33:53 +09:00
Kazu Yamamoto
4764ff1acb ghc-modi boot. 2014-04-21 16:30:31 +09:00
Kazu Yamamoto
a1d33b39d3 style. 2014-04-21 16:03:46 +09:00
Kazu Yamamoto
8983cf2d88 lineSeparator are only used in toList/toPlain. 2014-04-21 15:58:36 +09:00
Kazu Yamamoto
b2c2d1a443 cleaning up APIs. 2014-04-21 14:04:58 +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
df4dd97e48 ghc-mod debug does not need a file. 2014-04-21 11:31:15 +09:00
Kazu Yamamoto
12dac1f0a5 ghc-mod root does not need a file. 2014-04-21 11:22:39 +09:00
Kazu Yamamoto
756d17eaa2 -l for ghc-modi info. 2014-04-21 09:45:41 +09:00
Kazu Yamamoto
c138f4bac8 convert hack. 2014-04-19 21:23:01 +09:00
Kazu Yamamoto
38cbff3d5c doc. 2014-04-19 20:48:44 +09:00
Kazu Yamamoto
8d866d7a5b ghc-modi does not display \n in the case of lisp style. 2014-04-19 15:26:22 +09:00
Kazu Yamamoto
4389dea800 -l for check. 2014-04-18 17:28:12 +09:00
Kazu Yamamoto
e24fc141f8 Using Options. 2014-04-11 16:07:36 +09:00
Kazu Yamamoto
e9859980ab info/type does not require module name.
Fallback was removed. See #199.
2014-04-11 11:51:25 +09:00
exfalso
b1f6388cf5 added -g option to ghc-modi 2014-04-10 15:21:30 +02:00
Kazu Yamamoto
02af334b94 imports Data.ByteString, System.FilePath, and System.Directory at booting. 2014-04-08 13:56:33 +09:00
Shohei Murayama
a33aeaa973 add command line option: -b sep 2014-04-07 14:08:54 +09:00
Kazu Yamamoto
63fdd28025 setting current dir to root dir. 2014-04-03 16:18:35 +09:00
Kazu Yamamoto
246ea5e2c9 fixing cabal macro. 2014-04-03 10:22:29 +09:00
Kazu Yamamoto
ac45c24e3a fixing a bug of removeMainTarget.
If CPP is specified, a temprary file name was used.
2014-03-31 12:32:00 +09:00
Kazu Yamamoto
2dca76d0a1 fixing the help. 2014-03-31 11:38:07 +09:00
Kazu Yamamoto
7fa3736bac fixing a bug of hlint options. 2014-03-28 15:03:41 +09:00
Kazu Yamamoto
7cb9944b0b hlint options. 2014-03-28 14:41:01 +09:00
Kazu Yamamoto
0c76a801f6 hlint hack. 2014-03-28 13:53:58 +09:00
Kazu Yamamoto
4911db0a7a error handling for hlint. 2014-03-28 13:51:47 +09:00
Kazu Yamamoto
998464f585 the format of hlint options. 2014-03-28 13:44:44 +09:00
Kazu Yamamoto
99aeebfb6f for hlint. 2014-03-27 16:28:27 +09:00
Kazu Yamamoto
7ccb4ab045 "doc" command. 2014-03-27 16:23:27 +09:00
Kazu Yamamoto
660a1e95f5 using liftIO from CoreMonad. 2014-03-27 15:08:07 +09:00
Kazu Yamamoto
07ec988251 closed import. 2014-03-27 14:55:24 +09:00
Kazu Yamamoto
856310e0fe closed import. 2014-03-27 14:46:33 +09:00
Kazu Yamamoto
d3d9eb1e2c Data.ByteString cannot be loaded if not specified in cabal file. 2014-03-27 14:24:38 +09:00
Kazu Yamamoto
b49bb4d5ab preventing error messages from the sub thread. 2014-03-27 12:58:35 +09:00
Kazu Yamamoto
1bad35aa95 fixing a bug for Data.ByteString. 2014-03-27 12:43:03 +09:00
Kazu Yamamoto
fa4222f727 lint in ghc-modi. 2014-03-27 10:34:43 +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
d6d50cff1e fixing double Main problem. 2014-03-25 12:28:39 +09:00
Kazu Yamamoto
b2c4212c01 refactoring ghc-modi. 2014-03-25 11:34:58 +09:00
Kazu Yamamoto
6ce9ded357 refactoring ghc-modi. 2014-03-25 11:14:25 +09:00
Kazu Yamamoto
9b67baafba ghc-modi takes "cmd arg". 2014-03-24 17:32:06 +09:00
Kazu Yamamoto
d0a10277bf make ghc-modi robust. 2014-03-20 17:40:06 +09:00
Kazu Yamamoto
ee6dc2fc47 ghc-mod root. 2014-03-20 16:21:48 +09:00