summaryrefslogtreecommitdiff
path: root/testsuite/tests/polykinds/NestedProxies.hs
blob: a9873b01022de8d4bfff43c50be275e816c67af6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{-# LANGUAGE Haskell2010 #-}
{-# 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)))))))))