From f20cf982f126aea968ed6a482551550ffb6650cf Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Mon, 9 Oct 2017 13:16:59 +0100 Subject: Remove wc_insol from WantedConstraints This patch is a pure refactoring, which I've wanted to do for some time. The main payload is * Remove the wc_insol field from WantedConstraints; instead put all the insolubles in wc_simple * Remove inert_insols from InertCans Instead put all the insolubles in inert_irreds * Add a cc_insol flag to CIrredCan, to record that the constraint is definitely insoluble Reasons * Quite a bit of code gets slightly simpler * Fewer concepts to keep separate * Insolubles don't happen at all in production code that is just being recompiled, so previously there was a lot of moving-about of empty sets A couple of error messages acutally improved. --- testsuite/tests/deriving/should_fail/T3621.stderr | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'testsuite/tests/deriving') diff --git a/testsuite/tests/deriving/should_fail/T3621.stderr b/testsuite/tests/deriving/should_fail/T3621.stderr index 88004bb230..ec68e81f41 100644 --- a/testsuite/tests/deriving/should_fail/T3621.stderr +++ b/testsuite/tests/deriving/should_fail/T3621.stderr @@ -1,9 +1,15 @@ T3621.hs:24:43: error: - • No instance for (MonadState state (State s)) - arising from the 'deriving' clause of a data type declaration - Possible fix: - use a standalone 'deriving instance' declaration, - so you can specify the instance context yourself + • Couldn't match type ‘s’ with ‘state’ + arising from a functional dependency between: + constraint ‘MonadState state (State s)’ + arising from the 'deriving' clause of a data type declaration + instance ‘MonadState s1 (State s1)’ at T3621.hs:21:10-31 + ‘s’ is a rigid type variable bound by + the deriving clause for ‘MonadState state (WrappedState s)’ + at T3621.hs:24:43-58 + ‘state’ is a rigid type variable bound by + the deriving clause for ‘MonadState state (WrappedState s)’ + at T3621.hs:24:43-58 • When deriving the instance for (MonadState state (WrappedState s)) -- cgit v1.2.1