summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts/T15591.hs
blob: a27f8f02690e53bbb08f0fb388a23512ab521b26 (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
30
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE MultiParamTypeClasses #-}
module Foo where

import Data.Kind
import Data.Proxy

type family T1 (x :: f (a :: Type))

class C (a :: Type) where
  type T2 (x :: f a)

class C2 (a :: Type) (b :: Proxy a) (c :: Proxy b) where
  type T3 (x :: Proxy '(a, (c :: Proxy b)))
     -- NB: we have to put (c :: Proxy b) so that 'b' is Specified
     --     in the kind of T3; else 'b' is Inferred and comes
     --     first, which is ill-scoped

-- no CUSK
class C3 (a :: Type) (b :: Proxy a) (c :: Proxy b) d where
  type T4 (x :: Proxy '(a, (c :: Proxy b)))
     -- Ditto to T3

class C4 (a :: Type) b where
  type T5 (x :: f a)

class C5 a where
  type T6 (x :: f a)