[project @ 1999-08-20 13:13:03 by simonpj]
authorsimonpj <unknown>
Fri, 20 Aug 1999 13:13:03 +0000 (13:13 +0000)
committersimonpj <unknown>
Fri, 20 Aug 1999 13:13:03 +0000 (13:13 +0000)
Add tcrun005

ghc/tests/typecheck/should_run/tcrun005.hs [new file with mode: 0644]
ghc/tests/typecheck/should_run/tcrun005.stdout [new file with mode: 0644]

diff --git a/ghc/tests/typecheck/should_run/tcrun005.hs b/ghc/tests/typecheck/should_run/tcrun005.hs
new file mode 100644 (file)
index 0000000..2c31572
--- /dev/null
@@ -0,0 +1,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"
diff --git a/ghc/tests/typecheck/should_run/tcrun005.stdout b/ghc/tests/typecheck/should_run/tcrun005.stdout
new file mode 100644 (file)
index 0000000..52c33a5
--- /dev/null
@@ -0,0 +1 @@
+"ok"