From 2277172ac3ea0bbeddebc9999a5d8b5f9f58afc9 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Thu, 11 May 2017 15:42:55 -0400 Subject: Parenthesize pretty-printed equalities when necessary Fixes #13677 by parenthesizing equalities in a sufficiently high pretty-printing context. Test Plan: make test TEST=T13677 Reviewers: goldfire, austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13677 Differential Revision: https://phabricator.haskell.org/D3570 --- testsuite/tests/typecheck/should_fail/T13677.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 testsuite/tests/typecheck/should_fail/T13677.hs (limited to 'testsuite/tests/typecheck/should_fail/T13677.hs') diff --git a/testsuite/tests/typecheck/should_fail/T13677.hs b/testsuite/tests/typecheck/should_fail/T13677.hs new file mode 100644 index 0000000000..f452a202bb --- /dev/null +++ b/testsuite/tests/typecheck/should_fail/T13677.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE ConstraintKinds #-} +{-# LANGUAGE GADTs #-} +module T13677 where + +import GHC.Exts (Constraint) + +data Dict a where + Dict :: a => Dict a + +foo :: Dict (Int ~ Int) => Int +foo = undefined -- cgit v1.2.1