summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/typecheck/should_run/tcrun005.hs
blob: 2c315725ef73e04ea123c7e11294fd4bf59e139d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
-- !!! Dfun naming bug

module Main where


  data TT  = TT
  data TTT = TTT

  class CC  a where
	op_cc :: a -> a
	
  class CCT a where
	op_cct :: a -> a

  -- These two instances should get different dfun names!
  -- In GHC 4.04 they both got $fCCTTT

  instance CC TTT where
	op_cc = id

  instance CCT TT where
	op_cct = id

  main = case op_cc TTT of
	   TTT -> print "ok"