[project @ 1997-10-14 10:48:43 by simonm]
authorsimonm <unknown>
Tue, 14 Oct 1997 10:48:44 +0000 (10:48 +0000)
committersimonm <unknown>
Tue, 14 Oct 1997 10:48:44 +0000 (10:48 +0000)
add test for locally-overloaded constructor arguments

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

diff --git a/ghc/tests/typecheck/should_compile/tc092.hs b/ghc/tests/typecheck/should_compile/tc092.hs
new file mode 100644 (file)
index 0000000..a429de4
--- /dev/null
@@ -0,0 +1,9 @@
+module ShouldSucceed where
+
+data Empty q                   =  Empty (Ord a => q a)
+q                              :: (Ord a) => [a]
+q                              =  []
+e0, e1, e2                     :: Empty []
+e0                             =  Empty []
+e1                             =  Empty ([] :: (Ord a) => [a])
+e2                             =  Empty q
diff --git a/ghc/tests/typecheck/should_compile/tc092.stderr b/ghc/tests/typecheck/should_compile/tc092.stderr
new file mode 100644 (file)
index 0000000..012e69f
--- /dev/null
@@ -0,0 +1,17 @@
+ghc: module version changed to 1; reason: no old .hi file
+_interface_ ShouldSucceed 1
+_instance_modules_
+ArrBase IO PrelNum
+_usages_
+PrelBase 1 :: $d15 1 $d16 1 $d2 1 $d27 1 $d28 1 $d33 1 $d35 1 $d38 1 $d40 1 $d42 1 $d45 1 $d46 1 $d47 1 $d50 1 $d52 1 $d7 1 $d8 1 $m/= 1 $m< 1 $m<= 1 $m> 1 $m>= 1 $mcompare 1 $mmax 1 $mmin 1 Eq 1 Eval 1 Ord 1 Ordering 1;
+PrelNum 1 :: $d17 1 $d18 1;
+_exports_
+ShouldSucceed e0 e1 e2 q Empty(Empty);
+_instances_
+instance _forall_ [q :: (* -> *)] => {PrelBase.Eval (Empty q)} = $d1;
+_declarations_
+1 $d1 _:_ _forall_ [q :: (* -> *)] => {PrelBase.Eval (Empty q)} ;;
+1 e0 _:_ Empty PrelBase.[] ;;
+1 e1 _:_ Empty PrelBase.[] ;;
+1 e2 _:_ Empty PrelBase.[] ;;
+1 q _:_ _forall_ [ta] {PrelBase.Ord ta} => [ta] ;;