diff options
Diffstat (limited to 'testsuite/tests/partial-sigs/should_fail')
25 files changed, 371 insertions, 22 deletions
diff --git a/testsuite/tests/partial-sigs/should_fail/T10045.stderr b/testsuite/tests/partial-sigs/should_fail/T10045.stderr index a18ef48b83..e6f6462d5d 100644 --- a/testsuite/tests/partial-sigs/should_fail/T10045.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T10045.stderr @@ -1,10 +1,9 @@ T10045.hs:6:18: error: • Found type wildcard ‘_’ standing for ‘t1 -> Bool -> t2’ - Where: ‘t1’ is a rigid type variable bound by - the inferred type of copy :: t1 -> Bool -> t2 at T10045.hs:7:10-34 - ‘t2’ is a rigid type variable bound by - the inferred type of copy :: t1 -> Bool -> t2 at T10045.hs:7:10-34 + Where: ‘t1’, ‘t2’ are rigid type variables bound by + the inferred type of copy :: t1 -> Bool -> t2 + at T10045.hs:7:10-34 To use the inferred type, enable PartialTypeSignatures • In the type signature: copy :: _ In the expression: diff --git a/testsuite/tests/partial-sigs/should_fail/T10615.stderr b/testsuite/tests/partial-sigs/should_fail/T10615.stderr index c17759a531..0b9bcb811c 100644 --- a/testsuite/tests/partial-sigs/should_fail/T10615.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T10615.stderr @@ -8,7 +8,8 @@ T10615.hs:4:7: error: T10615.hs:5:6: error: • Couldn't match type ‘f’ with ‘b1 -> a1’ ‘f’ is a rigid type variable bound by - the inferred type of f1 :: a1 -> f at T10615.hs:5:1-10 + the inferred type of f1 :: a1 -> f + at T10615.hs:5:1-10 Expected type: a1 -> f Actual type: a1 -> b1 -> a1 • In the expression: const @@ -24,7 +25,8 @@ T10615.hs:7:7: error: T10615.hs:8:6: error: • Couldn't match type ‘_f’ with ‘b0 -> a0’ ‘_f’ is a rigid type variable bound by - the inferred type of f2 :: a0 -> _f at T10615.hs:8:1-10 + the inferred type of f2 :: a0 -> _f + at T10615.hs:8:1-10 Expected type: a0 -> _f Actual type: a0 -> b0 -> a0 • In the expression: const diff --git a/testsuite/tests/partial-sigs/should_fail/T10999.stderr b/testsuite/tests/partial-sigs/should_fail/T10999.stderr index 0b534b9480..5da96928c4 100644 --- a/testsuite/tests/partial-sigs/should_fail/T10999.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T10999.stderr @@ -24,9 +24,9 @@ T10999.hs:8:28: error: instance Ord a => Ord (Set.Set a) -- Defined in ‘Data.Set.Internal’ instance Ord Ordering -- Defined in ‘GHC.Classes’ instance Ord Integer - -- Defined in ‘integer-gmp-1.0.0.1:GHC.Integer.Type’ - ...plus 23 others - ...plus two instances involving out-of-scope types + -- Defined in ‘integer-gmp-1.0.1.0:GHC.Integer.Type’ + ...plus 22 others + ...plus three instances involving out-of-scope types (use -fprint-potential-instances to see them all) • In the second argument of ‘($)’, namely ‘f ()’ In the second argument of ‘($)’, namely ‘Set.toList $ f ()’ diff --git a/testsuite/tests/partial-sigs/should_fail/T11515.hs b/testsuite/tests/partial-sigs/should_fail/T11515.hs new file mode 100644 index 0000000000..2a03e240a8 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T11515.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE ConstraintKinds, TypeFamilies #-} + +module T11515 where + +type family ShowSyn a where ShowSyn a = Show a + +foo :: (ShowSyn a, _) => a -> String +foo x = show x diff --git a/testsuite/tests/partial-sigs/should_fail/T11515.stderr b/testsuite/tests/partial-sigs/should_fail/T11515.stderr new file mode 100644 index 0000000000..2870457500 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T11515.stderr @@ -0,0 +1,5 @@ + +T11515.hs:7:20: error: + • Found type wildcard ‘_’ standing for ‘()’ + To use the inferred type, enable PartialTypeSignatures + • In the type signature: foo :: (ShowSyn a, _) => a -> String diff --git a/testsuite/tests/partial-sigs/should_fail/T11976.stderr b/testsuite/tests/partial-sigs/should_fail/T11976.stderr index f0e2784f6f..28104625e1 100644 --- a/testsuite/tests/partial-sigs/should_fail/T11976.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T11976.stderr @@ -1,7 +1,17 @@ +T11976.hs:7:7: error: + • Cannot instantiate unification variable ‘a0’ + with a type involving foralls: Lens w3 w4 w5 + GHC doesn't yet support impredicative polymorphism + • In the expression: undefined :: Lens _ _ _ + In an equation for ‘foo’: foo = undefined :: Lens _ _ _ + • Relevant bindings include + foo :: Lens w w1 w2 (bound at T11976.hs:7:1) + T11976.hs:7:20: error: - • Illegal polymorphic type: Lens w0 w1 - GHC doesn't yet support impredicative polymorphism - • In an expression type signature: Lens _ _ _ + • Expected kind ‘k0 -> *’, but ‘Lens _ _’ has kind ‘*’ + • In the type ‘Lens _ _ _’ + In an expression type signature: Lens _ _ _ In the expression: undefined :: Lens _ _ _ - In an equation for ‘foo’: foo = undefined :: Lens _ _ _ + • Relevant bindings include + foo :: Lens w w1 w2 (bound at T11976.hs:7:1) diff --git a/testsuite/tests/partial-sigs/should_fail/T12634.stderr b/testsuite/tests/partial-sigs/should_fail/T12634.stderr index 7f1d713c4f..316f7eb2c5 100644 --- a/testsuite/tests/partial-sigs/should_fail/T12634.stderr +++ b/testsuite/tests/partial-sigs/should_fail/T12634.stderr @@ -1,6 +1,6 @@ T12634.hs:14:37: error: - • Found type wildcard ‘_’ standing for ‘() :: Constraint’ + • Found type wildcard ‘_’ standing for ‘()’ To use the inferred type, enable PartialTypeSignatures • In the type signature: bench_twacePow :: forall t m m' r. @@ -15,3 +15,17 @@ T12634.hs:14:58: error: In the type signature: bench_twacePow :: forall t m m' r. _ => t m' r -> Bench '(t, m, m', r) + +T12634.hs:15:18: error: + • Couldn't match kind ‘(* -> * -> *, *, *, *)’ with ‘*’ + When matching types + params0 :: * + '(t, m, m', r) :: (* -> * -> *, *, *, *) + Expected type: t m' r -> Bench '(t, m, m', r) + Actual type: t m' r -> Bench params0 + • In the expression: bench (twacePowDec :: t m' r -> t m r) + In an equation for ‘bench_twacePow’: + bench_twacePow = bench (twacePowDec :: t m' r -> t m r) + • Relevant bindings include + bench_twacePow :: t m' r -> Bench '(t, m, m', r) + (bound at T12634.hs:15:1) diff --git a/testsuite/tests/partial-sigs/should_fail/T13324_fail1.hs b/testsuite/tests/partial-sigs/should_fail/T13324_fail1.hs new file mode 100644 index 0000000000..a177cbdbd9 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T13324_fail1.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE PartialTypeSignatures #-} +{-# LANGUAGE StandaloneDeriving #-} +module T13324_fail1 where + +data Option a = None | Some a + +deriving instance (Eq a, _) => Eq (Option a) +deriving instance (Show _) => Show (Option a) diff --git a/testsuite/tests/partial-sigs/should_fail/T13324_fail1.stderr b/testsuite/tests/partial-sigs/should_fail/T13324_fail1.stderr new file mode 100644 index 0000000000..dd3a9948f9 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T13324_fail1.stderr @@ -0,0 +1,10 @@ + +T13324_fail1.hs:7:26: error: + Extra-constraint wildcard ‘_’ not allowed + except as the sole constraint + e.g., deriving instance _ => Eq (Foo a) + in a deriving declaration + +T13324_fail1.hs:8:25: error: + Wildcard ‘_’ not allowed + in a deriving declaration diff --git a/testsuite/tests/partial-sigs/should_fail/T13324_fail2.hs b/testsuite/tests/partial-sigs/should_fail/T13324_fail2.hs new file mode 100644 index 0000000000..41f36c7b20 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T13324_fail2.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE GADTs #-} +{-# LANGUAGE PartialTypeSignatures #-} +{-# LANGUAGE StandaloneDeriving #-} +module T13324_fail2 where + +newtype Foo f a = Foo (f (f a)) +deriving instance _ => Eq (Foo f a) + +data T a where + MkT :: T Int +deriving instance _ => Eq (T a) diff --git a/testsuite/tests/partial-sigs/should_fail/T13324_fail2.stderr b/testsuite/tests/partial-sigs/should_fail/T13324_fail2.stderr new file mode 100644 index 0000000000..75e4829cdb --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T13324_fail2.stderr @@ -0,0 +1,12 @@ + +T13324_fail2.hs:7:1: error: + • No instance for (Eq (f (f a))) + arising from a 'deriving' declaration + Possible fix: fill in the wildcard constraint yourself + • When deriving the instance for (Eq (Foo f a)) + +T13324_fail2.hs:11:1: error: + • Can't make a derived instance of ‘Eq (T a)’: + Constructor ‘MkT’ is a GADT + Possible fix: fill in the wildcard constraint yourself + • In the stand-alone deriving instance for ‘_ => Eq (T a)’ diff --git a/testsuite/tests/partial-sigs/should_fail/T14040a.hs b/testsuite/tests/partial-sigs/should_fail/T14040a.hs new file mode 100644 index 0000000000..2985339f49 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T14040a.hs @@ -0,0 +1,34 @@ +{-# LANGUAGE GADTs #-} +{-# LANGUAGE RankNTypes #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE TypeApplications #-} +{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE DataKinds, PolyKinds #-} +module T14040a where + +import Data.Kind + +data family Sing (a :: k) + +data WeirdList :: Type -> Type where + WeirdNil :: WeirdList a + WeirdCons :: a -> WeirdList (WeirdList a) -> WeirdList a + +data instance Sing (z :: WeirdList a) where + SWeirdNil :: Sing WeirdNil + SWeirdCons :: Sing w -> Sing wws -> Sing (WeirdCons w wws) + +elimWeirdList :: forall (a :: Type) (wl :: WeirdList a) + (p :: forall (x :: Type). x -> WeirdList x -> Type). + Sing wl + -> (forall (y :: Type). p _ WeirdNil) + -> (forall (z :: Type) (x :: z) (xs :: WeirdList (WeirdList z)). + Sing x -> Sing xs -> p _ xs + -> p _ (WeirdCons x xs)) + -> p _ wl +elimWeirdList SWeirdNil pWeirdNil _ = pWeirdNil +elimWeirdList (SWeirdCons (x :: Sing (x :: z)) + (xs :: Sing (xs :: WeirdList (WeirdList z)))) + pWeirdNil pWeirdCons + = pWeirdCons @z @x @xs x xs + (elimWeirdList @(WeirdList z) @xs @p xs pWeirdNil pWeirdCons) diff --git a/testsuite/tests/partial-sigs/should_fail/T14040a.stderr b/testsuite/tests/partial-sigs/should_fail/T14040a.stderr new file mode 100644 index 0000000000..20a0fa51ca --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T14040a.stderr @@ -0,0 +1,31 @@ + +T14040a.hs:34:8: error: + • Cannot apply expression of type ‘Sing wl + -> (forall y. p w0 'WeirdNil) + -> (forall z1 (x :: z1) (xs :: WeirdList (WeirdList z1)). + Sing x -> Sing xs -> p w1 xs -> p w2 ('WeirdCons x xs)) + -> p w3 wl’ + to a visible type argument ‘(WeirdList z)’ + • In the sixth argument of ‘pWeirdCons’, namely + ‘(elimWeirdList @(WeirdList z) @xs @p xs pWeirdNil pWeirdCons)’ + In the expression: + pWeirdCons + @z + @x + @xs + x + xs + (elimWeirdList @(WeirdList z) @xs @p xs pWeirdNil pWeirdCons) + In an equation for ‘elimWeirdList’: + elimWeirdList + (SWeirdCons (x :: Sing (x :: z)) + (xs :: Sing (xs :: WeirdList (WeirdList z)))) + pWeirdNil + pWeirdCons + = pWeirdCons + @z + @x + @xs + x + xs + (elimWeirdList @(WeirdList z) @xs @p xs pWeirdNil pWeirdCons) diff --git a/testsuite/tests/partial-sigs/should_fail/T14449.hs b/testsuite/tests/partial-sigs/should_fail/T14449.hs new file mode 100644 index 0000000000..d49a390af2 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T14449.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE PartialTypeSignatures #-} + +module T14449 where + +f :: a -> b -> _ +f x y = [x, y] diff --git a/testsuite/tests/partial-sigs/should_fail/T14449.stderr b/testsuite/tests/partial-sigs/should_fail/T14449.stderr new file mode 100644 index 0000000000..01e73b5edb --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T14449.stderr @@ -0,0 +1,4 @@ + +T14449.hs:6:1: error: + Couldn't match ‘a’ with ‘b’ + both bound by the partial type signature: f :: a -> b -> _ diff --git a/testsuite/tests/partial-sigs/should_fail/T14479.hs b/testsuite/tests/partial-sigs/should_fail/T14479.hs new file mode 100644 index 0000000000..13ee256e83 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T14479.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE ScopedTypeVariables, PartialTypeSignatures #-} + +module T14479 where + +foo :: Num a => a -> a +foo xxx = g xxx + where + g :: forall b. Num b => _ -> b + g y = xxx + y diff --git a/testsuite/tests/partial-sigs/should_fail/T14479.stderr b/testsuite/tests/partial-sigs/should_fail/T14479.stderr new file mode 100644 index 0000000000..84ba90a572 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T14479.stderr @@ -0,0 +1,10 @@ + +T14479.hs:9:5: error: + • Can't quantify over ‘b’ + bound by the partial type signature: g :: forall b. Num b => _ -> b + • In an equation for ‘foo’: + foo xxx + = g xxx + where + g :: forall b. Num b => _ -> b + g y = xxx + y diff --git a/testsuite/tests/partial-sigs/should_fail/T14584.hs b/testsuite/tests/partial-sigs/should_fail/T14584.hs new file mode 100644 index 0000000000..1615b26205 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T14584.hs @@ -0,0 +1,56 @@ +{-# OPTIONS_GHC -fdefer-type-errors #-} -- Very important to this bug! +{-# Language PartialTypeSignatures #-} +{-# Language TypeFamilyDependencies, KindSignatures #-} +{-# Language PolyKinds #-} +{-# Language DataKinds #-} +{-# Language TypeFamilies #-} +{-# Language RankNTypes #-} +{-# Language NoImplicitPrelude #-} +{-# Language FlexibleContexts #-} +{-# Language MultiParamTypeClasses #-} +{-# Language GADTs #-} +{-# Language ConstraintKinds #-} +{-# Language FlexibleInstances #-} +{-# Language TypeOperators #-} +{-# Language ScopedTypeVariables #-} +{-# Language DefaultSignatures #-} +{-# Language FunctionalDependencies #-} +{-# Language UndecidableSuperClasses #-} +{-# Language UndecidableInstances #-} +{-# Language AllowAmbiguousTypes #-} +{-# Language InstanceSigs, TypeApplications #-} + + +module T14584 where + +import Data.Monoid +import Data.Kind + +data family Sing (a::k) + +class SingKind k where + type Demote k = (res :: Type) | res -> k + fromSing :: Sing (a::k) -> Demote k + +class SingI (a::k) where + sing :: Sing a + +data ACT :: Type -> Type -> Type +data MHOM :: Type -> Type -> Type + +type m %%- a = ACT m a -> Type +type m %%-> m' = MHOM m m' -> Type + +class Monoid m => Action (act :: m %%- a) where + act :: m -> (a -> a) + +class (Monoid m, Monoid m') => MonHom (mhom :: m %%-> m') where + monHom :: m -> m' + +data MonHom_Distributive m :: (m %%- a) -> (a %%-> a) + +type Good k = (Demote k ~ k, SingKind k) + +instance (Action act, Monoid a, Good m) => MonHom (MonHom_Distributive m act :: a %%-> a) where + monHom :: a -> a + monHom = act @_ @_ @act (fromSing @m (sing @m @a :: Sing _)) diff --git a/testsuite/tests/partial-sigs/should_fail/T14584.stderr b/testsuite/tests/partial-sigs/should_fail/T14584.stderr new file mode 100644 index 0000000000..f22178774e --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T14584.stderr @@ -0,0 +1,64 @@ + +T14584.hs:56:41: warning: [-Wdeferred-type-errors (in -Wdefault)] + • Could not deduce: m1 ~ * + from the context: (Action act, Monoid a, Good m1) + bound by the instance declaration at T14584.hs:54:10-89 + ‘m1’ is a rigid type variable bound by + the instance declaration + at T14584.hs:54:10-89 + When matching types + a :: * + a0 :: m + Expected type: Sing a0 + Actual type: Sing a + • In the second argument of ‘fromSing’, namely + ‘(sing @m @a :: Sing _)’ + In the fourth argument of ‘act’, namely + ‘(fromSing @m (sing @m @a :: Sing _))’ + In the expression: + act @_ @_ @act (fromSing @m (sing @m @a :: Sing _)) + • Relevant bindings include + monHom :: a -> a (bound at T14584.hs:56:3) + +T14584.hs:56:41: warning: [-Wdeferred-type-errors (in -Wdefault)] + • Could not deduce: a ~~ a0 + from the context: (Action act, Monoid a, Good m1) + bound by the instance declaration at T14584.hs:54:10-89 + ‘a’ is a rigid type variable bound by + the instance declaration + at T14584.hs:54:10-89 + Expected type: Sing a0 + Actual type: Sing a + • In the second argument of ‘fromSing’, namely + ‘(sing @m @a :: Sing _)’ + In the fourth argument of ‘act’, namely + ‘(fromSing @m (sing @m @a :: Sing _))’ + In the expression: + act @_ @_ @act (fromSing @m (sing @m @a :: Sing _)) + • Relevant bindings include + monHom :: a -> a (bound at T14584.hs:56:3) + +T14584.hs:56:41: warning: [-Wdeferred-type-errors (in -Wdefault)] + • Could not deduce (SingI a) arising from a use of ‘sing’ + from the context: (Action act, Monoid a, Good m1) + bound by the instance declaration at T14584.hs:54:10-89 + • In the second argument of ‘fromSing’, namely + ‘(sing @m @a :: Sing _)’ + In the fourth argument of ‘act’, namely + ‘(fromSing @m (sing @m @a :: Sing _))’ + In the expression: + act @_ @_ @act (fromSing @m (sing @m @a :: Sing _)) + +T14584.hs:56:60: warning: [-Wpartial-type-signatures (in -Wdefault)] + • Found type wildcard ‘_’ standing for ‘a0 :: m’ + Where: ‘a0’ is an ambiguous type variable + ‘m’ is a rigid type variable bound by + the instance declaration + at T14584.hs:54:10-89 + • In an expression type signature: Sing _ + In the second argument of ‘fromSing’, namely + ‘(sing @m @a :: Sing _)’ + In the fourth argument of ‘act’, namely + ‘(fromSing @m (sing @m @a :: Sing _))’ + • Relevant bindings include + monHom :: a -> a (bound at T14584.hs:56:3) diff --git a/testsuite/tests/partial-sigs/should_fail/T14584a.hs b/testsuite/tests/partial-sigs/should_fail/T14584a.hs new file mode 100644 index 0000000000..016295ac4f --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T14584a.hs @@ -0,0 +1,16 @@ +{-# OPTIONS_GHC -fdefer-type-errors #-} -- Very important to this bug! +{-# Language PartialTypeSignatures #-} +{-# Language KindSignatures #-} +{-# Language PolyKinds #-} +{-# Language ScopedTypeVariables #-} +{-# Language AllowAmbiguousTypes #-} +{-# Language TypeApplications #-} + +module T14584a where + +f :: forall m. () +f = id @m :: _ + +g :: forall m. () +g = let h = id @m + in h diff --git a/testsuite/tests/partial-sigs/should_fail/T14584a.stderr b/testsuite/tests/partial-sigs/should_fail/T14584a.stderr new file mode 100644 index 0000000000..5687dcec51 --- /dev/null +++ b/testsuite/tests/partial-sigs/should_fail/T14584a.stderr @@ -0,0 +1,37 @@ + +T14584a.hs:12:5: warning: [-Wdeferred-type-errors (in -Wdefault)] + • Couldn't match expected type ‘()’ with actual type ‘m -> m’ + • In the expression: id @m :: _ + In an equation for ‘f’: f = id @m :: _ + +T14584a.hs:12:9: warning: [-Wdeferred-type-errors (in -Wdefault)] + • Expected a type, but ‘m’ has kind ‘k2’ + • In the type ‘m’ + In the expression: id @m :: _ + In an equation for ‘f’: f = id @m :: _ + +T14584a.hs:12:14: warning: [-Wpartial-type-signatures (in -Wdefault)] + • Found type wildcard ‘_’ standing for ‘m -> m’ + Where: ‘m’, ‘k’ are rigid type variables bound by + the type signature for: + f :: forall k2 (m :: k2). () + at T14584a.hs:11:1-17 + • In an expression type signature: _ + In the expression: id @m :: _ + In an equation for ‘f’: f = id @m :: _ + • Relevant bindings include f :: () (bound at T14584a.hs:12:1) + +T14584a.hs:15:17: warning: [-Wdeferred-type-errors (in -Wdefault)] + • Expected a type, but ‘m’ has kind ‘k2’ + • In the type ‘m’ + In the expression: id @m + In an equation for ‘h’: h = id @m + • Relevant bindings include h :: m -> m (bound at T14584a.hs:15:9) + +T14584a.hs:16:8: warning: [-Wdeferred-type-errors (in -Wdefault)] + • Couldn't match expected type ‘()’ with actual type ‘m -> m’ + • Probable cause: ‘h’ is applied to too few arguments + In the expression: h + In the expression: let h = id @m in h + In an equation for ‘g’: g = let h = id @m in h + • Relevant bindings include h :: m -> m (bound at T14584a.hs:15:9) diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr index 9090475bc6..367e10a16f 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInInstanceHead.stderr @@ -1,4 +1,4 @@ WildcardInInstanceHead.hs:7:14: error: Wildcard ‘_’ not allowed - in an instance declaration for ‘Foo’ + in an instance declaration diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr index 8e989108b1..0609021c15 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInStandaloneDeriving.stderr @@ -1,6 +1,4 @@ -WildcardInStandaloneDeriving.hs:4:19: error: Malformed instance: _ - WildcardInStandaloneDeriving.hs:4:19: error: Wildcard ‘_’ not allowed in a deriving declaration diff --git a/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr b/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr index 440d8722de..aa5e8247f3 100644 --- a/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr +++ b/testsuite/tests/partial-sigs/should_fail/WildcardInstantiations.stderr @@ -30,10 +30,7 @@ WildcardInstantiations.hs:8:8: error: WildcardInstantiations.hs:8:13: error: • Found type wildcard ‘_’ standing for ‘t -> w’ - Where: ‘t’ is a rigid type variable bound by - the inferred type of bar :: t -> (t -> w) -> w - at WildcardInstantiations.hs:9:1-13 - ‘w’ is a rigid type variable bound by + Where: ‘t’, ‘w’ are rigid type variables bound by the inferred type of bar :: t -> (t -> w) -> w at WildcardInstantiations.hs:9:1-13 To use the inferred type, enable PartialTypeSignatures diff --git a/testsuite/tests/partial-sigs/should_fail/all.T b/testsuite/tests/partial-sigs/should_fail/all.T index 183791868f..9866029e91 100644 --- a/testsuite/tests/partial-sigs/should_fail/all.T +++ b/testsuite/tests/partial-sigs/should_fail/all.T @@ -3,7 +3,7 @@ test('AnnotatedConstraintNotForgotten', normal, compile_fail, ['']) test('Defaulting1MROff', normal, compile, ['']) test('ExtraConstraintsWildcardInExpressionSignature', normal, compile, ['']) test('ExtraConstraintsWildcardInPatternSignature', normal, compile_fail, ['']) -test('ExtraConstraintsWildcardInPatternSplice', normal, compile_fail, ['']) +test('ExtraConstraintsWildcardInPatternSplice', [req_interp, normal], compile_fail, ['']) test('ExtraConstraintsWildcardInTypeSpliceUsed', [extra_files(['ExtraConstraintsWildcardInTypeSplice.hs']), req_interp], multimod_compile_fail, @@ -59,8 +59,16 @@ test('T10615', normal, compile_fail, ['']) test('T10045', normal, compile_fail, ['']) test('T10999', normal, compile_fail, ['']) test('T11122', normal, compile, ['']) +test('T11515', normal, compile_fail, ['']) test('T11976', normal, compile_fail, ['']) test('PatBind3', normal, compile_fail, ['']) test('T12039', normal, compile_fail, ['']) test('T12634', normal, compile_fail, ['']) test('T12732', normal, compile_fail, ['-fobject-code -fdefer-typed-holes']) +test('T13324_fail1', normal, compile_fail, ['']) +test('T13324_fail2', normal, compile_fail, ['']) +test('T14040a', normal, compile_fail, ['']) +test('T14449', normal, compile_fail, ['']) +test('T14479', normal, compile_fail, ['']) +test('T14584', normal, compile, ['']) +test('T14584a', normal, compile, ['']) |