summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-api/annotations/Test10598.hs
blob: 8a7651c1543154acbfa53ecadc1aa2c8a915b2e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE StandaloneDeriving #-}
module Test10598 where

class C a where
  c :: proxy a -> Int
  c _ = 42

instance C Int where
  c _ = 27

newtype Foo = MkFoo Int
  deriving          Eq
  deriving stock    Ord
  deriving anyclass C
deriving newtype instance Show Foo