summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T17366a.hs
blob: ece130f31cddfe436200c5e8e6213f9889b3f19f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module T17366a where
import Data.Functor.Identity

class C f where
  c :: f a -> a

instance C Identity where
  c (Identity a) = a

newtype Tagged tag a = Tagged a

instance C (Tagged tag) where
  c (Tagged a) = a

f :: C f => f a -> a
f a = c a
{-# INLINABLE[0] f #-}