summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_compile/T14933.hs
blob: 2682d6242fa770c5ad289193328d8996d8135301 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE DeriveAnyClass    #-}
{-# LANGUAGE TypeFamilies      #-}
module T14933 where

class Wrapped s where
  type Unwrapped s :: *

class Fork m where
    fork :: (x, m)

    default fork :: ( Wrapped m
                    , Unwrapped m ~ t
                    , Fork t
                    ) => (x, m)
    fork = undefined

newtype MyThing m = MyThing m
    deriving Fork

instance Wrapped (MyThing m) where
    type Unwrapped (MyThing m) = m