Commit Graph

54 Commits

Author SHA1 Message Date
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
d276b9bb7f Remove redundant imports 2015-08-15 21:26:33 +03:00
Nikolay Yakimov
de5ff87f19 Don't use infix call for type ctor 2015-08-15 20:58:45 +03:00
Nikolay Yakimov
2504f643e9 Replace mapped names with original ones in output 2015-08-15 20:58:45 +03:00
Nikolay Yakimov
f8a0325617 Load all mapped targets 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
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
443650705c Fix #532, Use first component in cabal file for dangling modules in cabal projects 2015-08-12 10:44:41 +02:00
Daniel Gröber
28f06e035d Cleanup project type handling 2015-08-12 09:25:13 +02:00
Daniel Gröber
11243e5304 Add in-memory caching otherwise everything is slow 2015-08-11 07:38:25 +02:00
Daniel Gröber
8439f12cb0 Let Cabal determine the package-db stack 2015-08-07 07:31:08 +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
6e28e07ca9 Fix #507 2015-08-05 08:01:25 +02:00
Daniel Gröber
d270e92951 Clean up L.H.GM.Target debug/vomit output a bit 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
614522644b Fix imports for ghc < 7.10 2015-08-03 07:51:23 +02:00
Daniel Gröber
6ef389a757 Merge branch 'Fix502' of https://github.com/acowley/ghc-mod 2015-08-03 05:48:15 +02:00
Daniel Gröber
75d4a2a9d6 Some debug logging for cabal configure etc. 2015-08-03 05:47:16 +02:00
Daniel Gröber
f023d939e2 Fix GHC 7.10 warnings 2015-08-03 05:46:51 +02:00
Daniel Gröber
160cec86bb Comment 2015-08-03 05:46:51 +02:00
Daniel Gröber
42e72b3816 Fix fileModuleName not working on CPP modules given by path 2015-08-03 05:46:51 +02:00
Anthony Cowley
e06e4d25df More sensitive to cache invalidation.
This addresses a problem where changes to a .cabal file were not
invalidating the cache files.
2015-07-08 18:15:05 -04:00
Daniel Gröber
acfc575e13 Make unknown component fallback message more clear 2015-06-07 02:45:50 +02:00
Daniel Gröber
baf557d5bf Comment 2015-06-07 01:53:41 +02:00
Daniel Gröber
49515b3eb8 Fix #487, Modules from sandbox not visible 2015-06-05 22:45:52 +02:00
Daniel Gröber
a2e4a5d683 Revert "use standard findFile instead of hand-rolled one"
This reverts commit b055098127.
2015-05-20 12:05:22 +02:00
Sergey Vinokurov
84134e1fee replace redundant liftM7 function with applicatives 2015-05-19 21:00:54 +03:00
Sergey Vinokurov
f7717ee1ee fix typo 2015-05-17 23:25:49 +03:00
Sergey Vinokurov
b055098127 use standard findFile instead of hand-rolled one 2015-05-17 23:25:49 +03:00
Daniel Gröber
e6fc3dd8d2 Fix tests 2015-05-08 00:06:08 +02:00
Daniel Gröber
c45a7f4b52 Fix caching for getGhcPkgOptions 2015-05-05 14:47:23 +02:00
Daniel Gröber
8b8f947b5e Reinitialize GHC session when options change 2015-04-29 18:44:21 +02:00
Daniel Gröber
cf5dfa439c Clarify HscInterpreted log message 2015-04-29 17:22:48 +02:00
Daniel Gröber
c831332185 Set -O0 to avoid various interperter issues 2015-04-29 17:21:37 +02:00
Daniel Gröber
9077e96aeb Fix tests 2015-04-13 23:16:14 +02:00
Daniel Gröber
ee4ee8765e Fix weird resolveModule double path issue
`mconcat` recurses into `Maybe a` which is not what I want, I just want
the first `Just` value
2015-04-12 02:48:54 +02:00
Daniel Gröber
2bf4c80580 Fix finding consistent component solution for targets
Union does the wrong thing, I wanted an intersection here.
2015-04-12 02:48:54 +02:00
Daniel Gröber
39a8ded102 Fix resolved component caching 2015-04-12 02:48:54 +02:00
Daniel Gröber
ca79f99c3e Also add language options when resolving components 2015-04-12 02:48:54 +02:00
Daniel Gröber
6f59f07f00 Fix non canonicalized paths 2015-04-12 02:48:54 +02:00
Daniel Gröber
7019cbcfa1 Implement better caching for target options 2015-03-28 02:32:44 +01:00
Daniel Gröber
90d9577f8d Factor out cabal-helper into a package 2015-03-15 20:48:55 +01:00
Daniel Gröber
539c294dd4 Fix a bunch of relate exception handling problems
should handle exceptions outside of runGmlT otherwise we don't catch ghc
load related ones.
2015-03-09 22:04:04 +01:00
Daniel Gröber
a6d3f477bc Add better handling for empty component assignments 2015-03-08 17:32:17 +01:00
Daniel Gröber
01dde80385 Bring test suite up to date 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
7438539ca5 Change primary license to AGPL-3 2015-03-03 21:09:18 +01:00
Daniel Gröber
1c8d1edb4d Workaround for #340 2014-09-12 04:02:32 +02:00