diff options
Diffstat (limited to 'testsuite/tests/polykinds')
-rw-r--r-- | testsuite/tests/polykinds/NestedProxies.hs | 28 | ||||
-rw-r--r-- | testsuite/tests/polykinds/T13393.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/polykinds/all.T | 1 |
3 files changed, 30 insertions, 1 deletions
diff --git a/testsuite/tests/polykinds/NestedProxies.hs b/testsuite/tests/polykinds/NestedProxies.hs new file mode 100644 index 0000000000..d59d026544 --- /dev/null +++ b/testsuite/tests/polykinds/NestedProxies.hs @@ -0,0 +1,28 @@ +{-# LANGUAGE KindSignatures #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE UndecidableInstances #-} +{-# LANGUAGE StarIsType #-} +{-# OPTIONS_GHC -Wno-star-is-type #-} +-- NB: -XNoPolyKinds. All the variables in the Proxies should be defaulted to *. + +module NestedProxies where + +import Data.Proxy + +-- | 'F1' docs +type family F1 a b :: * -> * +-- | 'F2' docs +type family F2 a b :: * -> * where + F2 Int b = Maybe + F2 a b = [] +-- | 'D' docs +data family D a :: * -> * + +v :: Int +v = 42 + +-- | 'C' docs +class C a where + -- | 'AT' docs + type AT a + type AT a = Proxy (Proxy (Proxy (Proxy (Proxy (Proxy (Proxy (Proxy (Proxy (Proxy))))))))) diff --git a/testsuite/tests/polykinds/T13393.hs b/testsuite/tests/polykinds/T13393.hs index f1c4af3fa0..28cf87a6d5 100644 --- a/testsuite/tests/polykinds/T13393.hs +++ b/testsuite/tests/polykinds/T13393.hs @@ -28,7 +28,7 @@ newtype AacEncSt (rate :: Rate) channels (codec :: AacCodec) = MkAacEncSt -- makeLenses ''AacEncSt -type Iso s t a b = forall p f. (Functor f) => (a -> f b) -> s -> (f t) +type Iso s t a b = forall f. (Functor f) => (a -> f b) -> s -> (f t) instance (Monad m, Monoid w) => MonadState s (RWST r w s m) where iso :: (s -> a) -> (b -> t) -> Iso s t a b diff --git a/testsuite/tests/polykinds/all.T b/testsuite/tests/polykinds/all.T index 52529f882a..c82f275f65 100644 --- a/testsuite/tests/polykinds/all.T +++ b/testsuite/tests/polykinds/all.T @@ -228,6 +228,7 @@ test('T18300', normal, compile_fail, ['']) test('T18451', normal, compile_fail, ['']) test('T18451a', normal, compile_fail, ['']) test('T18451b', normal, compile_fail, ['']) +test('NestedProxies', normal, compile, ['']) test('T18522-ppr', normal, ghci_script, ['T18522-ppr.script']) test('T18855', normal, compile, ['']) test('T19092', normal, compile, ['']) |