From: simonpj Date: Thu, 5 Oct 2000 16:03:22 +0000 (+0000) Subject: [project @ 2000-10-05 16:03:22 by simonpj] X-Git-Tag: Approximately_9120_patches~3686 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6f80ddc8452fa0cd407d56a7088aea2e3f3e577e;p=ghc-hetmet.git [project @ 2000-10-05 16:03:22 by simonpj] Add test for for-all types in arguments --- diff --git a/ghc/tests/typecheck/should_fail/tcfail088.hs b/ghc/tests/typecheck/should_fail/tcfail088.hs new file mode 100644 index 0000000..00991a3 --- /dev/null +++ b/ghc/tests/typecheck/should_fail/tcfail088.hs @@ -0,0 +1,15 @@ +{-# OPTIONS -fglasgow-exts #-} + +-- !!! Check that forall types can't be arguments +module ShouldFail where + + +data T s a = MkT s a + +instance Ord a => Ord (forall s. T s a) +-- A for-all should not appear as an argument to Ord + + + +g :: T s (forall b.b) +g = error "urk" diff --git a/ghc/tests/typecheck/should_fail/tcfail088.stderr b/ghc/tests/typecheck/should_fail/tcfail088.stderr new file mode 100644 index 0000000..bd08451 --- /dev/null +++ b/ghc/tests/typecheck/should_fail/tcfail088.stderr @@ -0,0 +1,12 @@ + +tcfail088.hs:9: + Illegal polymorphic type as argument: forall s. T s a + When checking kinds in `Ord (forall s. T s a)' + +tcfail088.hs:14: + Illegal polymorphic type as argument: forall b. b + When checking kinds in `T s (forall b. b)' + In a type signature for `g' + +Compilation had errors +