Commit Graph

47 Commits

Author SHA1 Message Date
Alan Zimmerman
e198f68f2a Rearrange loadTargets code.
The loadTargets function is exposed via the Internal module for use by
external programmes, such as HaRe.

Re-arrange to code so that it can still be called with a list of string
targets, as it was before.
2015-08-19 03:34:01 +02: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
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
Alan Zimmerman
eafde94913 Expose functions for integration with HaRe 2015-08-13 09:49:51 +02: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
2b4fd77c28 Add GHC-7.10 support 2015-02-08 12:43:35 +01:00
Daniel Gröber
37af8e368d Refactoring World, etc. and fix #387 2014-11-02 01:19:27 +01: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
Daniel Gröber
5a4bec8755 Rewrite ghc-mod command line frontend. 2014-09-18 10:45:14 +02: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
Kazu Yamamoto
9456ea426d fixing typos. 2014-08-19 17:18:36 +09:00
Daniel Gröber
1b5917c70e Remove withErrorHandler, use liftExceptions instead 2014-08-19 04:30:44 +02:00
Daniel Gröber
f5d051dcef Remove toGhcModT it's not needed anymore. 2014-08-15 20:35:21 +02:00
Kazu Yamamoto
81efe04c01 removing |||> (#292) 2014-08-14 10:08:48 +09:00
Daniel Gröber
f311efd90c Rework GhcModT monad stack 2014-08-06 19:38:42 +02:00
Kazu Yamamoto
0080f9b68c Internal exports extra Monad stuff. 2014-07-18 15:42:05 +09:00
Kazu Yamamoto
26316262aa converting GhcMonad to IOish. 2014-07-18 14:54:39 +09:00
Daniel Gröber
b6896a481a Move initializeFlagsWithCradle to Monad.hs 2014-07-12 03:33:04 +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
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
411a584bb8 using check finally. 2014-04-28 16:31:28 +09:00
Kazu Yamamoto
fc570551a2 withLogger handles errors. 2014-04-28 13:52:28 +09:00
Kazu Yamamoto
117d01a52a removing -Wall and -w:. 2014-04-28 12:52:09 +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
390c509144 find functions went to lib. 2014-04-24 17:02:50 +09:00
Kazu Yamamoto
2d1133ea8e exporting necessary types. 2014-04-24 12:17:50 +09:00
Daniel Gröber
c9ca3a6d76 Clean up DynFlags initialization 2014-04-23 04:04:41 +02:00
Kazu Yamamoto
4389dea800 -l for check. 2014-04-18 17:28:12 +09:00
Daniel Gröber
30b8366526 Refactor the way packages databases are handled
- cradle now stores a list of active package databases instead of only
  the user store (if present).

- rename `cradlePackageDb` -> `cradlePkgDbStack` as that`s what the ghc
  documentaion calls this kind of thing

- `getPackageDbPackages` now returns names of all visible packages in
  the given directory. Also the implementation now uses `ghc-pkg`
  instead of manually looking at the package database
2014-04-15 05:15:50 +02:00
Kazu Yamamoto
955b1b4091 user package db options for both GHC and ghc-pkg. 2014-03-28 12:05:11 +09:00
Kazu Yamamoto
782da60d0c adding docs. 2014-03-26 12:09:02 +09:00
Kazu Yamamoto
38a3e32ac3 browseAll. 2014-03-25 11:14:16 +09:00
Kazu Yamamoto
d0a10277bf make ghc-modi robust. 2014-03-20 17:40:06 +09:00
Kazu Yamamoto
be926f0366 new APIs. 2014-03-19 10:23:32 +09:00
Kazu Yamamoto
16e050439d removing fast/slow code. 2014-03-17 15:56:00 +09:00
Kazu Yamamoto
4426f7fd0f Defining cabalAllTargets.
This is from @alanz (#151).
2013-09-20 17:25:28 +09:00
Kazu Yamamoto
43f49f7abe doc for getCompilerOptions. 2013-09-20 10:30:51 +09:00
Kazu Yamamoto
8e4d2cec21 Obsoleting fromCabalFile. 2013-09-19 16:21:48 +09:00
Kazu Yamamoto
97da4e9be1 Defining CompilerOptions. 2013-09-19 15:58:50 +09:00
Kazu Yamamoto
45751e3926 Exporting more low level APIs. 2013-09-16 09:56:08 +09:00
Niklas Hambüchen
4758a6043c check + expand: Allow passing in multiple files 2013-09-03 20:01:47 +09:00
Alan Zimmerman
e487a535eb Rename GhcModLowLevel to GhcMod.Internal and document exposed items. 2013-08-26 18:28:21 +02:00