[project @ 1999-09-16 19:26:01 by sof]
authorsof <unknown>
Thu, 16 Sep 1999 19:26:01 +0000 (19:26 +0000)
committersof <unknown>
Thu, 16 Sep 1999 19:26:01 +0000 (19:26 +0000)
checking Main.main's type + newtype def that caused a ghc-X (X<4.03, I think) TC crash

ghc/tests/typecheck/should_compile/tc103.hs [new file with mode: 0644]
ghc/tests/typecheck/should_compile/tc103.stderr [new file with mode: 0644]
ghc/tests/typecheck/should_compile/tc104.hs [new file with mode: 0644]
ghc/tests/typecheck/should_compile/tc104.stderr [new file with mode: 0644]

diff --git a/ghc/tests/typecheck/should_compile/tc103.hs b/ghc/tests/typecheck/should_compile/tc103.hs
new file mode 100644 (file)
index 0000000..06f3475
--- /dev/null
@@ -0,0 +1,7 @@
+-- !!! Caused ghc-3.03 and 4.01 tc to enter a 
+-- !!! a blackhole (as reported by P. Callaghan.)
+module ShouldCompile where
+
+type C a = D a -> a
+newtype D a = DD (D_ a)
+type D_ a = C (Maybe a)
diff --git a/ghc/tests/typecheck/should_compile/tc103.stderr b/ghc/tests/typecheck/should_compile/tc103.stderr
new file mode 100644 (file)
index 0000000..46f80b1
--- /dev/null
@@ -0,0 +1,5 @@
+ghc: module version changed to 1; reason: no old .hi file
+__export ShouldCompile C D{DD} D_;
+1 newtype D a = DD (D_  a) ;
+1 type C a = D   a -> a ;
+1 type D_ a = C   (PrelMaybe.Maybe a) ;
diff --git a/ghc/tests/typecheck/should_compile/tc104.hs b/ghc/tests/typecheck/should_compile/tc104.hs
new file mode 100644 (file)
index 0000000..25f354c
--- /dev/null
@@ -0,0 +1,4 @@
+-- !!! Checking that Main.main's type can now be of the form (IO a)
+module Main(main) where
+
+main = putStrLn "Hello" >> return (id)
diff --git a/ghc/tests/typecheck/should_compile/tc104.stderr b/ghc/tests/typecheck/should_compile/tc104.stderr
new file mode 100644 (file)
index 0000000..8d6352d
--- /dev/null
@@ -0,0 +1,3 @@
+ghc: module version changed to 1; reason: no old .hi file
+__export Main main;
+1 main :: __forall [a] => PrelIOBase.IO (a -> a) ;