summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_compile/T23329_M.hs
blob: a451a2b8281ecbc69b4dcb3c2aba92c2c33bd9a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
module T23329_M where

import Data.Kind (Type)
import Data.Proxy (Proxy)

class MyClass (f :: k -> Type) where
  type MyTypeFamily f (i :: k) :: Type
  myMethod :: MyTypeFamily f i -> Proxy f -> Proxy i -> ()

instance MyClass Maybe where
  type MyTypeFamily Maybe i = ()
  myMethod = undefined

newtype MyMaybe a = MyMaybe (Maybe a)
  deriving MyClass