From: sof Date: Thu, 16 Sep 1999 19:26:01 +0000 (+0000) Subject: [project @ 1999-09-16 19:26:01 by sof] X-Git-Tag: Approximately_9120_patches~5786 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=0a85c215d884ec5fea00c323aa8d25345f9e53bc;p=ghc-hetmet.git [project @ 1999-09-16 19:26:01 by sof] checking Main.main's type + newtype def that caused a ghc-X (X<4.03, I think) TC crash --- diff --git a/ghc/tests/typecheck/should_compile/tc103.hs b/ghc/tests/typecheck/should_compile/tc103.hs new file mode 100644 index 0000000..06f3475 --- /dev/null +++ b/ghc/tests/typecheck/should_compile/tc103.hs @@ -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 index 0000000..46f80b1 --- /dev/null +++ b/ghc/tests/typecheck/should_compile/tc103.stderr @@ -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 index 0000000..25f354c --- /dev/null +++ b/ghc/tests/typecheck/should_compile/tc104.hs @@ -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 index 0000000..8d6352d --- /dev/null +++ b/ghc/tests/typecheck/should_compile/tc104.stderr @@ -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) ;