Commit Graph

73 Commits

Author SHA1 Message Date
Nikolay Yakimov 960a49c1ed [Type-constraints] Marginally better version
* Instead of listify, it walks the tree instead, so that constraints are only visible in relevant context.
* Uses Map instead of [(,)]
* Performs type substitutions in case of one child identifier found (relevant for constructor bindings)
2016-01-19 22:50:14 +03:00
Nikolay Yakimov 549d3e1006 [Type-constraints] Compounds type substitution 2016-01-18 09:02:28 +03:00
Nikolay Yakimov 966c694dbf [Type-constraints] Initial attempt at compounds
I try to compute constraints for "compound" types.
While constraint-building itself is simple, types
do not match due to different representation
between 'internal' and 'exported' signatures.
2016-01-18 07:09:14 +03:00
Nikolay Yakimov 88f61724d4 [Type-constraints] Proof-of-concept 2016-01-18 07:09:14 +03: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 0b65487e50 Stderr output pre-GhcModT for stack cradle 2015-08-31 07:49:06 +02:00
Daniel Gröber 473f1e09c7 Rename withContext -> withInteractiveContext 2015-08-21 04:12:53 +02:00
Nikolay Yakimov e7329a9d24 Replace redirected filenames in info. 2015-08-15 21:07:36 +03:00
Nikolay Yakimov 8f931eb928 Fix problem with fileModSummary 2015-08-15 21:07:35 +03:00
Daniel Gröber f023d939e2 Fix GHC 7.10 warnings 2015-08-03 05:46:51 +02:00
Sergey Vinokurov 4a9d578681 Improve style 2015-06-02 10:43:29 +03:00
Daniel Gröber 0f1e653f7f Change some logging stuff 2015-05-06 16:13:08 +02: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 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 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 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 a45fb4c6f5 Move case split and sig. generation to own files
- Created SrcUtils module for shared functionality
2014-06-21 11:38:44 +02:00
Alejandro Serrano 8c56d2e3c8 Obtain better information for case split 2014-06-18 21:01:22 +02:00
Alejandro Serrano 5a968225c3 Initial skeleton for case split in elisp 2014-06-17 18:15:36 +02:00
Alejandro Serrano 8a63ae078b Add missing cases for signatures 2014-06-16 22:10:01 +02:00
Alejandro Serrano 585c28f928 Initial implementation of instance completion 2014-06-11 22:01:43 +02:00
Alejandro Serrano 323c1b5471 Initial support for adding body from signature 2014-06-10 21:34:05 +02:00
Alejandro Serrano cedf59ace7 Merge branch 'fix-typed-holes' 2014-06-10 17:09:46 +02:00
Alejandro Serrano 2f42d77b53 Add special cases for case splitting 2014-06-09 13:01:47 +02:00
Alejandro Serrano c9b901f4f9 Fix problems with GHC's Typed Holes 2014-06-09 10:30:33 +02:00
Alejandro Serrano 0c445aa30f Work on case split variable naming 2014-06-08 14:23:06 +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
Daniel Gröber ebfb740a2e Move `convert` to it's own module. 2014-05-14 17:06:30 +02: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 dede115731 defining withContext. 2014-04-27 21:26:03 +09:00
Kazu Yamamoto 64365807f9 refactoring. 2014-04-26 23:03:50 +09:00
Kazu Yamamoto 98d3c7028c refactoring. 2014-04-26 22:51:29 +09:00
Kazu Yamamoto c45415a367 cleaning up check, splice flag and logger. 2014-04-26 17:54:15 +09:00
Kazu Yamamoto c8fbdcfa2f Thanks to DeferTypeErrors, info/type can work even if the file contains errors. 2014-04-26 11:43:30 +09:00
Kazu Yamamoto e49fef6765 setTargetFiles now loads files. 2014-04-24 12:15:59 +09:00
Kazu Yamamoto 79946f9a3d removing withGHCDummyFile. 2014-04-23 16:37:24 +09:00
Kazu Yamamoto b2c2d1a443 cleaning up APIs. 2014-04-21 14:04:58 +09:00
Kazu Yamamoto 756d17eaa2 -l for ghc-modi info. 2014-04-21 09:45:41 +09:00
Kazu Yamamoto 8f5498c554 refactoring. 2014-04-11 14:59:31 +09:00
Kazu Yamamoto a0d559de61 clarifying Ghc and IO. 2014-04-11 13:14:45 +09:00
Kazu Yamamoto 998a43ce24 removing depanal. 2014-04-11 12:56:06 +09:00
Kazu Yamamoto 196450af9f simplifying modSummary. 2014-04-11 12:41:39 +09:00
Kazu Yamamoto 3ed59464f0 just style. 2014-04-11 12:21:58 +09:00
Kazu Yamamoto 862e8c397c refactoring. 2014-04-11 12:19:42 +09:00
Kazu Yamamoto dd8f9a5fcb refactoring. 2014-04-11 11:54:39 +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
Kazu Yamamoto 54bea65736 style change. 2014-04-11 11:15:59 +09:00
Kazu Yamamoto ba4a1b9688 removing unnecessary code. 2014-04-11 11:13:24 +09:00