From da9b2ec3e19edb1de0e73e8f32aa0443743f072c Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Mon, 5 Jan 2015 12:56:46 +0000 Subject: Print singleton consraints without parens The main change is in TypeRep.pprTheta, so we print Eq a for a singleton, but (Eq a, Show a) for multiple constraints. There are lots of trivial knock-on changes to error messages --- testsuite/tests/typecheck/should_fail/T9109.stderr | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'testsuite/tests/typecheck/should_fail/T9109.stderr') diff --git a/testsuite/tests/typecheck/should_fail/T9109.stderr b/testsuite/tests/typecheck/should_fail/T9109.stderr index 3f5236b778..1c7e6e5c09 100644 --- a/testsuite/tests/typecheck/should_fail/T9109.stderr +++ b/testsuite/tests/typecheck/should_fail/T9109.stderr @@ -1,14 +1,14 @@ - -T9109.hs:8:13: - Couldn't match expected type ‘t’ with actual type ‘Bool’ - ‘t’ is untouchable - inside the constraints (t1 ~ Bool) - bound by a pattern with constructor: GBool :: G Bool, - in an equation for ‘foo’ - at T9109.hs:8:5-9 - ‘t’ is a rigid type variable bound by - the inferred type of foo :: G t1 -> t at T9109.hs:8:1 - Possible fix: add a type signature for ‘foo’ - Relevant bindings include foo :: G t1 -> t (bound at T9109.hs:8:1) - In the expression: True - In an equation for ‘foo’: foo GBool = True + +T9109.hs:8:13: + Couldn't match expected type ‘t’ with actual type ‘Bool’ + ‘t’ is untouchable + inside the constraints: t1 ~ Bool + bound by a pattern with constructor: GBool :: G Bool, + in an equation for ‘foo’ + at T9109.hs:8:5-9 + ‘t’ is a rigid type variable bound by + the inferred type of foo :: G t1 -> t at T9109.hs:8:1 + Possible fix: add a type signature for ‘foo’ + Relevant bindings include foo :: G t1 -> t (bound at T9109.hs:8:1) + In the expression: True + In an equation for ‘foo’: foo GBool = True -- cgit v1.2.1