Commit Graph

279 Commits

Author SHA1 Message Date
Daniel Gröber b9bd4ebf77 Fix warning with ghc 7.10 2015-12-09 23:38:31 +01:00
Nikolay Yakimov fcf82ae101 [Optparse] GPL headers 2015-12-10 01:26:05 +03:00
Nikolay Yakimov 80f8e0bb99 [Optparse] Browse, lint interactive commands 2015-12-10 00:40:37 +03:00
Nikolay Yakimov 01e1a83c25 [Optparse] s/##/<=>/g 2015-12-06 21:30:03 +03:00
Nikolay Yakimov 67cabf3cdf Add monoid import for ghc<7.10 2015-12-06 21:05:12 +03:00
Nikolay Yakimov c96b237147 Better legacy-interactive args parser 2015-12-06 19:47:11 +03:00
Nikolay Yakimov d255da0c89 Formatting 2015-12-06 19:22:21 +03:00
Nikolay Yakimov c8440a5c4d File-map comment doc update 2015-12-06 17:26:24 +03:00
Nikolay Yakimov d9292e0a63 Remove extraneous newline in version output 2015-12-06 02:43:12 +03:00
Nikolay Yakimov 75202b4be8 Optparse removed unused function 2015-12-06 02:41:02 +03:00
Nikolay Yakimov 41d7988972 Use readMaybe from Language.Haskell.GhcMod.Read 2015-12-06 02:29:30 +03:00
Nikolay Yakimov 3665026fbf Disambiguate logLevelParser 2015-12-06 02:11:49 +03:00
Nikolay Yakimov 9fd738ec97 Optparse GHC 7.4 compatibility 2015-12-06 01:36:09 +03:00
Nikolay Yakimov b2fb54a356 Fix tests, move option records to Types module 2015-12-06 00:56:19 +03:00
Nikolay Yakimov ad16b739eb Optparse-applicative 2015-12-05 23:55:12 +03:00
Heather de12b61d77 src: drop unused DeriveDataTypeable 2015-11-03 16:49:52 +04:00
Alan Zimmerman a23b832258 Make travis happy for 7.8 version 2015-10-03 16:00:46 +02:00
Alan Zimmerman fc7b059f92 Update from input by @lierdakil 2015-10-01 08:54:13 +02:00
Alan Zimmerman 1d370f5866 Speed up map-file loading 2015-09-30 21:31:07 +02:00
Daniel Gröber 7e565df923 Fix stdoutGateway line buffering 2015-09-16 05:13:20 +02:00
Daniel Gröber 56902bfe2d Don't mess with cwd, causes too many race conditions
I would just fork() but we have to support WinDOS, gah.
2015-09-14 10:12:01 +02:00
Daniel Gröber 0277d44695 Fix missing newline 2015-09-14 07:46:22 +02:00
Daniel Gröber 64379a7c56 Actually update `world` in legacyInteractiveLoop 2015-09-11 09:53:24 +02:00
Daniel Gröber 211b957451 Fix race condition in stack support code 2015-09-11 03:52:28 +02:00
Daniel Gröber 41de8b8b2e Sandwich new Monad layer GmOutT into transformer stack
This way we can have access to some options pre Cradle setup which
should fix the output interleaving problems I was observing.
2015-09-01 10:32:27 +02:00
Daniel Gröber 2af1da960b Also catch exceptions thrown in IO 2015-09-01 10:29:21 +02:00
Daniel Gröber 0b65487e50 Stderr output pre-GhcModT for stack cradle 2015-08-31 07:49:06 +02:00
Daniel Gröber 2a0414f368 Pass stack ghc paths down to cabal-helper 2015-08-31 04:17:33 +02:00
Daniel Gröber b25dbc2416 Merge branch 'stack-support' 2015-08-20 02:14:55 +02:00
Daniel Gröber 91f0c50b20 Merge branch 'file-redirection-2' of https://github.com/atom-haskell/ghc-mod 2015-08-20 02:10:05 +02:00
scturtle d660e7cd85 add 'StackProject' around 2015-08-19 09:17:30 +02:00
Nikolay Yakimov 2bd12ee417 Fix --map-file docs 2015-08-19 05:28:26 +03:00
Daniel Gröber cdc74e059c Fix ghc-modi not exiting cleanly 2015-08-18 04:50:19 +02:00
Daniel Gröber b40ee40df2 Merge branch 'master' of https://github.com/Bodigrim/ghc-mod 2015-08-18 03:49:16 +02:00
Nikolay Yakimov 0d78ee4096 getCanonicalFileNameSafe is now best-effort canonicalizatoin
Canonicalizes longest init of path possible, and appends rest verbatim
2015-08-17 08:43:34 +03:00
Nikolay Yakimov e0044a3697 Add FileMapping commands description to ghc-mod main. 2015-08-16 23:28:45 +03:00
Nikolay Yakimov a5dae2a82d Drop memory-mapped files, since ghc doesn't play well with those
All files are now "redirected", either user-created, or created by ghc-mod itself.
2015-08-16 23:20:00 +03:00
Nikolay Yakimov c96abfc422 Drop loadMappedFiles and move all loading code to progMain 2015-08-15 21:18:57 +03:00
Nikolay Yakimov d3b1bf125b Move reading source from stdin to frontend 2015-08-15 21:06:25 +03:00
Nikolay Yakimov 86545a895b Rename load and unload interact. cmds to map-file and unmap-file 2015-08-15 21:02:43 +03:00
Nikolay Yakimov e15eea2f39 Rename file-map option to map-file 2015-08-15 21:02:43 +03:00
Nikolay Yakimov e72d72eb86 Workaround for GHC 7.4 bugs 2015-08-15 20:41:10 +03:00
Nikolay Yakimov 3790fca20b Initial support for file redirection
Rewrite, taking discussion into consideration
2015-08-15 20:41:10 +03:00
Daniel Gröber 9cff067a27 Catch errors in legacy-interactive loop 2015-08-14 09:50:17 +02:00
Daniel Gröber e126db833a Disable nuke-caches for now, blowing away dist/ is too risky 2015-08-14 09:33:22 +02:00
Daniel Gröber 623cddd8ca Fix `find` being slow on legacy-interactive 2015-08-14 06:48:56 +02:00
Daniel Gröber 55bf578b87 Put line-prefix'es on exceptions too 2015-08-14 05:57:33 +02:00
Daniel Gröber cbfa26eb16 Make sure cabal-helper is ready before invoking dumpsym 2015-08-14 03:48:29 +02:00
Daniel Gröber 312a8c81fb Merge branch 'HaRe' of https://github.com/alanz/ghc-mod 2015-08-13 10:17:14 +02:00
Alan Zimmerman eafde94913 Expose functions for integration with HaRe 2015-08-13 09:49:51 +02:00
Daniel Gröber 2806f702d9 Start implementing line-prefix stuff
readProcess wrapper still missing from CabalHelper
2015-08-13 06:47:12 +02:00
Daniel Gröber 28f06e035d Cleanup project type handling 2015-08-12 09:25:13 +02:00
Daniel Gröber 2cd4d6bd80 Bind ghc-modi executable to right ghc-mod exe 2015-08-11 02:02:08 +02:00
Daniel Gröber 54dcfdf291 Defer the inevitable rewrite of the cmdline parser
a little while longer anyways
2015-08-10 13:37:31 +02:00
Daniel Gröber 1542a068f0 Rename debugComponent -> debug-component 2015-08-10 10:10:40 +02:00
Daniel Gröber d863e90775 Add nuke-caches command 2015-08-10 10:10:33 +02:00
Daniel Gröber 8439f12cb0 Let Cabal determine the package-db stack 2015-08-07 07:31:08 +02:00
Daniel Gröber a9c46c08f6 Fix warnings 2015-08-05 10:29:19 +02:00
Daniel Gröber f61dd0a9e6 Fix re-init of ghc-modi session after environment change
Using `dropSession` instead of a weird exception cludge
2015-08-05 08:52:52 +02:00
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