diff options
Diffstat (limited to 'testsuite/tests/deriving/should_compile/T23329_M.hs')
-rw-r--r-- | testsuite/tests/deriving/should_compile/T23329_M.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_compile/T23329_M.hs b/testsuite/tests/deriving/should_compile/T23329_M.hs new file mode 100644 index 0000000000..a451a2b828 --- /dev/null +++ b/testsuite/tests/deriving/should_compile/T23329_M.hs @@ -0,0 +1,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 |