summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving
diff options
context:
space:
mode:
authormynguyen <mnguyen1@brynmawr.edu>2018-12-18 11:52:26 -0500
committerRichard Eisenberg <rae@cs.brynmawr.edu>2019-01-03 08:57:32 -0500
commit17bd163566153babbf51adaff8397f948ae363ca (patch)
treeef25e933481def276de4cdcad77eb4a34a76444b /testsuite/tests/deriving
parent6e4e63764aaf558cf177c2a9c2da345b2a360ea6 (diff)
downloadhaskell-17bd163566153babbf51adaff8397f948ae363ca.tar.gz
Visible kind application
Summary: This patch implements visible kind application (GHC Proposal 15/#12045), as well as #15360 and #15362. It also refactors unnamed wildcard handling, and requires that type equations in type families in Template Haskell be written with full type on lhs. PartialTypeSignatures are on and warnings are off automatically with visible kind application, just like in term-level. There are a few remaining issues with this patch, as documented in ticket #16082. Includes a submodule update for Haddock. Test Plan: Tests T12045a/b/c/TH1/TH2, T15362, T15592a Reviewers: simonpj, goldfire, bgamari, alanz, RyanGlScott, Iceland_jack Subscribers: ningning, Iceland_jack, RyanGlScott, int-index, rwbarton, mpickering, carter GHC Trac Issues: `#12045`, `#15362`, `#15592`, `#15788`, `#15793`, `#15795`, `#15797`, `#15799`, `#15801`, `#15807`, `#15816` Differential Revision: https://phabricator.haskell.org/D5229
Diffstat (limited to 'testsuite/tests/deriving')
-rw-r--r--testsuite/tests/deriving/should_compile/T14579a.hs22
-rw-r--r--testsuite/tests/deriving/should_compile/all.T1
2 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/T14579a.hs b/testsuite/tests/deriving/should_compile/T14579a.hs
new file mode 100644
index 0000000000..ac7ba6cca8
--- /dev/null
+++ b/testsuite/tests/deriving/should_compile/T14579a.hs
@@ -0,0 +1,22 @@
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE TypeApplications #-}
+{-# LANGUAGE TypeInType #-}
+{-# LANGUAGE DataKinds #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE ScopedTypeVariables #-}
+
+module Bug where
+
+import Data.Coerce
+import Data.Kind
+import Data.Proxy
+
+newtype Wat (x :: Proxy (a :: Type)) = MkWat (Maybe a)
+ deriving Eq
+
+newtype Glurp a = MkGlurp (Wat ('Proxy :: Proxy a))
+
+instance Eq a => Eq (Glurp a) where
+ (==) = coerce @(Wat ('Proxy @a) -> Wat ('Proxy @a) -> Bool)
+ @(Glurp a -> Glurp a -> Bool)
+ (==)
diff --git a/testsuite/tests/deriving/should_compile/all.T b/testsuite/tests/deriving/should_compile/all.T
index c49b808860..8c84bcc31a 100644
--- a/testsuite/tests/deriving/should_compile/all.T
+++ b/testsuite/tests/deriving/should_compile/all.T
@@ -105,6 +105,7 @@ test('T14339', normal, compile, [''])
test('T14331', normal, compile, [''])
test('T14578', normal, compile, ['-ddump-deriv -dsuppress-uniques'])
test('T14579', normal, compile, [''])
+test('T14579a', normal, compile, [''])
test('T14682', normal, compile, ['-ddump-deriv -dsuppress-uniques'])
test('T14883', normal, compile, [''])
test('T14932', normal, compile, [''])