[project @ 1998-04-30 20:36:09 by sof]
authorsof <unknown>
Thu, 30 Apr 1998 20:36:11 +0000 (20:36 +0000)
committersof <unknown>
Thu, 30 Apr 1998 20:36:11 +0000 (20:36 +0000)
new local universal quant test

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

diff --git a/ghc/tests/typecheck/should_compile/tc096.stderr b/ghc/tests/typecheck/should_compile/tc096.stderr
new file mode 100644 (file)
index 0000000..a5e5580
--- /dev/null
@@ -0,0 +1,6 @@
+ghc: module version changed to 1; reason: no old .hi file
+_exports_
+ShouldSucceed main x;
+_declarations_
+1 main _:_ PrelIOBase.IO PrelBase.() ;;
+1 x _:_ PrelBase.Double ;;
diff --git a/ghc/tests/typecheck/should_compile/tc097.hs b/ghc/tests/typecheck/should_compile/tc097.hs
new file mode 100644 (file)
index 0000000..fac0101
--- /dev/null
@@ -0,0 +1,10 @@
+--!!! Local universal quantification.
+module ShouldSucceed where
+
+import PrelGHC -- to get at All
+
+data Monad2 m = MkMonad2 (All a => a -> m a)
+                         ((All a, All b) =>  m a -> (a -> m b) -> m b)
+
+halfListMonad  :: ((All a, All b) => [a] -> (a -> [b]) -> [b]) -> Monad2 []
+halfListMonad b = MkMonad2 (\x -> [x]) b
diff --git a/ghc/tests/typecheck/should_compile/tc097.stderr b/ghc/tests/typecheck/should_compile/tc097.stderr
new file mode 100644 (file)
index 0000000..19704af
--- /dev/null
@@ -0,0 +1,9 @@
+ghc: module version changed to 1; reason: no old .hi file
+_exports_
+ShouldSucceed halfListMonad Monad2(MkMonad2);
+_instances_
+instance _forall_ [a :: (* -> *)] => {PrelBase.Eval (Monad2 a)} = $dEvalMonad20;
+_declarations_
+1 $dEvalMonad20 _:_ _forall_ [a :: (* -> *)] => {PrelBase.Eval (Monad2 a)} ;;
+1 data Monad2 m :: (* -> *) = MkMonad2 (_forall_ [a] => a -> m a) (_forall_ [a b] => m a -> (a -> m b) -> m b) ;
+1 halfListMonad _:_ (_forall_ [a b] => [a] -> (a -> [b]) -> [b]) -> Monad2 PrelBase.[] ;;