[project @ 1999-12-29 12:12:59 by simonpj]
authorsimonpj <unknown>
Wed, 29 Dec 1999 12:12:59 +0000 (12:12 +0000)
committersimonpj <unknown>
Wed, 29 Dec 1999 12:12:59 +0000 (12:12 +0000)
Add rn037

ghc/tests/rename/should_compile/Makefile
ghc/tests/rename/should_compile/Rn037Help.hs [new file with mode: 0644]
ghc/tests/rename/should_compile/rn037.hs [new file with mode: 0644]

index ed85077..45b95af 100644 (file)
@@ -2,10 +2,14 @@ TOP = ../..
 include $(TOP)/mk/boilerplate.mk
 include $(TOP)/mk/should_compile.mk
 
-SRC_HC_OPTS += -noC -dcore-lint
+SRC_HC_OPTS += -dcore-lint
+# There used to be a -noC flag, but I removed it because
+# Rn037Help needs to generate an interface file, and
+# if -noC is on I can't see how to.  (Driver grottiness.)
 
-rn017_HC_OPTS = -hi -hi-with-exports
-rn025_HC_OPTS = -hi -hi-with-exports
+# rn017_HC_OPTS = -hi -hi-with-exports
+# rn025_HC_OPTS = -hi -hi-with-exports
+# Rn037Help_HC_OPTS = -hi
 
 include $(TOP)/mk/target.mk
 
diff --git a/ghc/tests/rename/should_compile/Rn037Help.hs b/ghc/tests/rename/should_compile/Rn037Help.hs
new file mode 100644 (file)
index 0000000..64d1224
--- /dev/null
@@ -0,0 +1,3 @@
+module Rn037Help( T(C) ) where
+
+data T = C
diff --git a/ghc/tests/rename/should_compile/rn037.hs b/ghc/tests/rename/should_compile/rn037.hs
new file mode 100644 (file)
index 0000000..668d707
--- /dev/null
@@ -0,0 +1,12 @@
+-- !!! Checking that you can hide a constructor
+module ShouldSucceed where
+
+import Rn037Help hiding( C )
+       -- C is the constructor, but we should
+       -- still be able to hide it
+
+f x = Rn037Help.C
+
+
+
+