Commit Graph

35 Commits

Author SHA1 Message Date
Daniel Gröber
585a9ef425 Fix doc in non-cabal projects
..man those non-cabal projects are really getting me down. Who uses
those anwayways ;)
2015-08-14 10:30:42 +02:00
Daniel Gröber
28f06e035d Cleanup project type handling 2015-08-12 09:25:13 +02:00
Daniel Gröber
a94d8977a9 Fix ghc-modi not working in non-cabal projects 2015-08-12 09:04:35 +02:00
Daniel Gröber
8439f12cb0 Let Cabal determine the package-db stack 2015-08-07 07:31:08 +02:00
Daniel Gröber
f023d939e2 Fix GHC 7.10 warnings 2015-08-03 05:46: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
417cacbf81 Fix finding sandbox in sandbox only projects 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
9ac128aa6f Fix #387, Pattern match failure in GhcPkg 2014-10-30 01:10:56 +01:00
Kazu Yamamoto
c4929c54af getConfig runs "cabal configure" first if setup-config is invalid. 2014-09-23 21:28:03 +09:00
Kazu Yamamoto
d831d6aa59 moving PackageDb stuff to GhcPkg. 2014-09-23 13:47:32 +09: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
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
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
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
9d9f66e942 Remove Maybe from cabalConfigDependencies and fromInstalledPackageId 2014-05-04 04:57:38 +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
152b218813 hlint hack. 2014-04-21 16:12:30 +09:00
Kazu Yamamoto
3c8fea85fb dropWhileEnd moves to Utils. 2014-04-19 15:20:16 +09:00
Daniel Gröber
8f3fb2a7d7 Only supress stderr on success 2014-04-18 13:22:31 +02:00
Kazu Yamamoto
9a6c84410d close import. 2014-04-18 16:17:46 +09:00
Kazu Yamamoto
f2081466fc Using Hidden also. (#223) 2014-04-18 16:12:21 +09:00
Kazu Yamamoto
aecb9bc1e4 implementing suppressStdout/err. 2014-04-18 15:41:32 +09:00
Daniel Gröber
bd2db5e98e Dont use Applicative ReadP instance 2014-04-18 04:00:01 +02:00
Daniel Gröber
2381f6e1ab More refactoring of package handling
- 'GhcPkg' now parses 'ghc-pkg -v list' output directly to also get the
  package-id

- Remove unused field 'cradlePackages' in Cradle

- Remove 'getPackageDbPackages' and use 'ghcPkgListEx' instead
2014-04-18 03:59:46 +02:00
Kazu Yamamoto
145c27a129 hlint hack. 2014-04-16 11:52:49 +09:00
Kazu Yamamoto
cd56e26b25 just style. 2014-04-16 11:50:31 +09:00
Kazu Yamamoto
697ad3722a removing warnings. 2014-04-16 11:32:36 +09:00
Daniel Gröber
bb438feb83 User ghc's cProjectVersionInt to get version information 2014-04-16 01:57:52 +02: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