diff options
author | Ross Paterson <R.Paterson@city.ac.uk> | 2022-09-25 15:33:25 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-09-27 14:12:01 -0400 |
commit | 9b1595c87f0c2406bb340c5e27a4a45dfcde0e2c (patch) | |
tree | 5058b79fa0484c7bb55bfc5515094dff50ae93b2 /testsuite/tests | |
parent | aeafdba5503b8d26a62dc7bc7078caef170d4154 (diff) | |
download | haskell-9b1595c87f0c2406bb340c5e27a4a45dfcde0e2c.tar.gz |
implement proposal 106 (Define Kinds Without Promotion) (fixes #6024)
includes corresponding changes to haddock submodule
Diffstat (limited to 'testsuite/tests')
45 files changed, 216 insertions, 0 deletions
diff --git a/testsuite/tests/driver/T4437.hs b/testsuite/tests/driver/T4437.hs index c25c3b7f1c..d8cf02218c 100644 --- a/testsuite/tests/driver/T4437.hs +++ b/testsuite/tests/driver/T4437.hs @@ -38,6 +38,7 @@ check title expected got expectedGhcOnlyExtensions :: [String] expectedGhcOnlyExtensions = [ "DeepSubsumption" + , "TypeData" ] expectedCabalOnlyExtensions :: [String] diff --git a/testsuite/tests/ghc-api/exactprint/Test20239.stderr b/testsuite/tests/ghc-api/exactprint/Test20239.stderr index 60ff0ec324..2bac5ab532 100644 --- a/testsuite/tests/ghc-api/exactprint/Test20239.stderr +++ b/testsuite/tests/ghc-api/exactprint/Test20239.stderr @@ -111,6 +111,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnn (Anchor diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr index de2f98d899..257d03eb20 100644 --- a/testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr +++ b/testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr @@ -840,6 +840,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnnNotUsed) { T17544.hs:25:5-18 }) (ConDeclGADT @@ -1108,6 +1109,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnnNotUsed) { T17544.hs:31:5-18 }) (ConDeclGADT @@ -1376,6 +1378,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnnNotUsed) { T17544.hs:37:5-18 }) (ConDeclGADT @@ -1644,6 +1647,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnnNotUsed) { T17544.hs:43:5-18 }) (ConDeclGADT @@ -1912,6 +1916,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnnNotUsed) { T17544.hs:49:5-18 }) (ConDeclGADT @@ -2180,6 +2185,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnnNotUsed) { T17544.hs:55:5-20 }) (ConDeclGADT diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr b/testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr index e00ee8798a..efc2c927ae 100644 --- a/testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr +++ b/testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr @@ -83,6 +83,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnnNotUsed) { T17544_kw.hs:16:9-20 }) (ConDeclGADT diff --git a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr index 926d97fb35..fdea6a5bce 100644 --- a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr +++ b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr @@ -98,6 +98,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnn (Anchor @@ -536,6 +537,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnnNotUsed) { DumpParsedAst.hs:15:21-29 }) (ConDeclH98 diff --git a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr index 88f23d3ee0..d3b7566f5d 100644 --- a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr +++ b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr @@ -113,6 +113,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnn (Anchor @@ -788,6 +789,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnnNotUsed) { DumpRenamedAst.hs:22:21-29 }) (ConDeclH98 diff --git a/testsuite/tests/parser/should_compile/T14189.stderr b/testsuite/tests/parser/should_compile/T14189.stderr index 29225d7f00..caede8b720 100644 --- a/testsuite/tests/parser/should_compile/T14189.stderr +++ b/testsuite/tests/parser/should_compile/T14189.stderr @@ -39,6 +39,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnn (Anchor diff --git a/testsuite/tests/parser/should_compile/T15323.stderr b/testsuite/tests/parser/should_compile/T15323.stderr index fbcfa63276..36768671e4 100644 --- a/testsuite/tests/parser/should_compile/T15323.stderr +++ b/testsuite/tests/parser/should_compile/T15323.stderr @@ -85,6 +85,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnnNotUsed) { T15323.hs:6:5-54 }) (ConDeclGADT diff --git a/testsuite/tests/parser/should_compile/T20452.stderr b/testsuite/tests/parser/should_compile/T20452.stderr index c7808c1019..8cbc6e13c2 100644 --- a/testsuite/tests/parser/should_compile/T20452.stderr +++ b/testsuite/tests/parser/should_compile/T20452.stderr @@ -102,6 +102,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnnNotUsed) { T20452.hs:5:26-31 }) (ConDeclH98 @@ -191,6 +192,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnnNotUsed) { T20452.hs:6:26-31 }) (ConDeclH98 diff --git a/testsuite/tests/printer/T18791.stderr b/testsuite/tests/printer/T18791.stderr index 2d8d3060ab..52c97faba4 100644 --- a/testsuite/tests/printer/T18791.stderr +++ b/testsuite/tests/printer/T18791.stderr @@ -71,6 +71,7 @@ (Nothing) (Nothing) (DataTypeCons + (False) [(L (SrcSpanAnn (EpAnnNotUsed) { T18791.hs:5:3-17 }) (ConDeclGADT diff --git a/testsuite/tests/type-data/Makefile b/testsuite/tests/type-data/Makefile new file mode 100644 index 0000000000..9a36a1c5fe --- /dev/null +++ b/testsuite/tests/type-data/Makefile @@ -0,0 +1,3 @@ +TOP=../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/type-data/should_compile/Makefile b/testsuite/tests/type-data/should_compile/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/type-data/should_compile/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/type-data/should_compile/TDDataConstructor.hs b/testsuite/tests/type-data/should_compile/TDDataConstructor.hs new file mode 100644 index 0000000000..8474ec25eb --- /dev/null +++ b/testsuite/tests/type-data/should_compile/TDDataConstructor.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE TypeData #-} +module TDDataConstructor where + +type data P = MkP +data Prom = P diff --git a/testsuite/tests/type-data/should_compile/TDExistential.hs b/testsuite/tests/type-data/should_compile/TDExistential.hs new file mode 100644 index 0000000000..0e9bb04014 --- /dev/null +++ b/testsuite/tests/type-data/should_compile/TDExistential.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE TypeData #-} +{-# LANGUAGE TypeFamilies #-} +module TDExistential where + +import Data.Kind (Type) + +-- example from GHC User's Guide 6.4.10.6 + +type data Ex :: Type where + MkEx :: forall a. a -> Ex + +type family UnEx (ex :: Ex) :: k +type instance UnEx (MkEx x) = x diff --git a/testsuite/tests/type-data/should_compile/TDGoodConsConstraints.hs b/testsuite/tests/type-data/should_compile/TDGoodConsConstraints.hs new file mode 100644 index 0000000000..0b4e006184 --- /dev/null +++ b/testsuite/tests/type-data/should_compile/TDGoodConsConstraints.hs @@ -0,0 +1,10 @@ +{-# LANGUAGE TypeData #-} +{-# LANGUAGE GADTs #-} +module TDGoodConsConstraints where + +import Data.Kind (Type) +import Data.Type.Equality + +type data Foo :: Type -> Type where + MkFoo1 :: a ~ Int => Foo a + MkFoo2 :: a ~~ Int => Foo a diff --git a/testsuite/tests/type-data/should_compile/TDVector.hs b/testsuite/tests/type-data/should_compile/TDVector.hs new file mode 100644 index 0000000000..753cd97375 --- /dev/null +++ b/testsuite/tests/type-data/should_compile/TDVector.hs @@ -0,0 +1,21 @@ +{-# LANGUAGE TypeData #-} +{-# LANGUAGE MonoLocalBinds #-} +module TDVector where + +import Data.Kind (Type) + +type data Nat = Zero | Succ Nat + +type data List a = Nil | Cons a (List a) + +type data Pair a b = MkPair a b + +type data Sum a b = L a | R b + +data Vec :: Nat -> Type -> Type where + VNil :: Vec Zero a + VCons :: a -> Vec n a -> Vec (Succ n) a + +instance Functor (Vec n) where + fmap _ VNil = VNil + fmap f (VCons x xs) = VCons (f x) (fmap f xs) diff --git a/testsuite/tests/type-data/should_compile/all.T b/testsuite/tests/type-data/should_compile/all.T new file mode 100644 index 0000000000..0f8294bee7 --- /dev/null +++ b/testsuite/tests/type-data/should_compile/all.T @@ -0,0 +1,4 @@ +test('TDDataConstructor', normal, compile, ['']) +test('TDExistential', normal, compile, ['']) +test('TDGoodConsConstraints', normal, compile, ['']) +test('TDVector', normal, compile, ['']) diff --git a/testsuite/tests/type-data/should_fail/Makefile b/testsuite/tests/type-data/should_fail/Makefile new file mode 100644 index 0000000000..9101fbd40a --- /dev/null +++ b/testsuite/tests/type-data/should_fail/Makefile @@ -0,0 +1,3 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk diff --git a/testsuite/tests/type-data/should_fail/TDBadConsConstraint.hs b/testsuite/tests/type-data/should_fail/TDBadConsConstraint.hs new file mode 100644 index 0000000000..43a709f516 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDBadConsConstraint.hs @@ -0,0 +1,8 @@ +{-# LANGUAGE TypeData #-} +{-# LANGUAGE GADTs #-} +module TDConsConstraints where + +import Data.Kind (Type) + +type data Foo :: Type -> Type where + MkFoo3 :: Show a => Foo a diff --git a/testsuite/tests/type-data/should_fail/TDBadConsConstraint.stderr b/testsuite/tests/type-data/should_fail/TDBadConsConstraint.stderr new file mode 100644 index 0000000000..1e2eddc456 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDBadConsConstraint.stderr @@ -0,0 +1,5 @@ + +TDBadConsConstraint.hs:8:3: [GHC-01259] + Illegal constraint in a kind: forall a. Show a => Foo a + In the definition of data constructor ‘MkFoo3’ + In the data type declaration for ‘Foo’ diff --git a/testsuite/tests/type-data/should_fail/TDDeriving.hs b/testsuite/tests/type-data/should_fail/TDDeriving.hs new file mode 100644 index 0000000000..dc804fc532 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDDeriving.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE TypeData #-} +module TDDeriving where + +type data Nat = Zero | Succ Nat + deriving (Eq) diff --git a/testsuite/tests/type-data/should_fail/TDDeriving.stderr b/testsuite/tests/type-data/should_fail/TDDeriving.stderr new file mode 100644 index 0000000000..231f2c7df7 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDDeriving.stderr @@ -0,0 +1,3 @@ + +TDDeriving.hs:4:1: [GHC-67297] + Deriving clauses are not allowed in type data declarations. diff --git a/testsuite/tests/type-data/should_fail/TDExpression.hs b/testsuite/tests/type-data/should_fail/TDExpression.hs new file mode 100644 index 0000000000..4f04993459 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDExpression.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE TypeData #-} +module TDExpression where + +type data Nat = Zero | Succ Nat + +-- Not in scope: data constructor ‘Zero’ +z = Zero diff --git a/testsuite/tests/type-data/should_fail/TDExpression.stderr b/testsuite/tests/type-data/should_fail/TDExpression.stderr new file mode 100644 index 0000000000..354dac183f --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDExpression.stderr @@ -0,0 +1,6 @@ + +TDExpression.hs:7:5: [GHC-31891] + Illegal term-level use of the type constructor or class ‘Zero’ + defined at TDExpression.hs:4:17 + In the expression: Zero + In an equation for ‘z’: z = Zero diff --git a/testsuite/tests/type-data/should_fail/TDMultiple01.hs b/testsuite/tests/type-data/should_fail/TDMultiple01.hs new file mode 100644 index 0000000000..ead94c4d1d --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDMultiple01.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE TypeData #-} +module TDMultiple01 where + +data P = MkP +type data Prom = P -- P is multiply defined diff --git a/testsuite/tests/type-data/should_fail/TDMultiple01.stderr b/testsuite/tests/type-data/should_fail/TDMultiple01.stderr new file mode 100644 index 0000000000..5b3abe33ed --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDMultiple01.stderr @@ -0,0 +1,5 @@ + +TDMultiple01.hs:5:18: + Multiple declarations of ‘P’ + Declared at: TDMultiple01.hs:4:1 + TDMultiple01.hs:5:18 diff --git a/testsuite/tests/type-data/should_fail/TDMultiple02.hs b/testsuite/tests/type-data/should_fail/TDMultiple02.hs new file mode 100644 index 0000000000..91dcf565f7 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDMultiple02.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE TypeData #-} +module TDMultiple02 where + +type data P = MkP +type data Prom = P -- type P is multiply defined diff --git a/testsuite/tests/type-data/should_fail/TDMultiple02.stderr b/testsuite/tests/type-data/should_fail/TDMultiple02.stderr new file mode 100644 index 0000000000..c08709fa8c --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDMultiple02.stderr @@ -0,0 +1,5 @@ + +TDMultiple02.hs:5:18: + Multiple declarations of ‘P’ + Declared at: TDMultiple02.hs:4:1 + TDMultiple02.hs:5:18 diff --git a/testsuite/tests/type-data/should_fail/TDNoPragma.hs b/testsuite/tests/type-data/should_fail/TDNoPragma.hs new file mode 100644 index 0000000000..a1b5386f62 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDNoPragma.hs @@ -0,0 +1,4 @@ +module TDNoPragma where + +-- requires LANGUAGE TypeData +type data Nat = Zero | Succ Nat diff --git a/testsuite/tests/type-data/should_fail/TDNoPragma.stderr b/testsuite/tests/type-data/should_fail/TDNoPragma.stderr new file mode 100644 index 0000000000..62b47da4d1 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDNoPragma.stderr @@ -0,0 +1,4 @@ + +TDNoPragma.hs:4:1: [GHC-15013] + Illegal type-level data declaration + Suggested fix: Perhaps you intended to use TypeData diff --git a/testsuite/tests/type-data/should_fail/TDPattern.hs b/testsuite/tests/type-data/should_fail/TDPattern.hs new file mode 100644 index 0000000000..abcf65de24 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDPattern.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE TypeData #-} +module TDPattern where + +type data Nat = Zero | Succ Nat + +-- Zero is not a data constructor +f Zero = 0 diff --git a/testsuite/tests/type-data/should_fail/TDPattern.stderr b/testsuite/tests/type-data/should_fail/TDPattern.stderr new file mode 100644 index 0000000000..3fecbb1f6b --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDPattern.stderr @@ -0,0 +1,3 @@ + +TDPattern.hs:7:3: [GHC-76037] + Not in scope: data constructor ‘Zero’ diff --git a/testsuite/tests/type-data/should_fail/TDPunning.hs b/testsuite/tests/type-data/should_fail/TDPunning.hs new file mode 100644 index 0000000000..0560009ce8 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDPunning.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE TypeData #-} +module TDPunning where + +type data T = T -- type T is multiply defined diff --git a/testsuite/tests/type-data/should_fail/TDPunning.stderr b/testsuite/tests/type-data/should_fail/TDPunning.stderr new file mode 100644 index 0000000000..95ddbf51d3 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDPunning.stderr @@ -0,0 +1,5 @@ + +TDPunning.hs:4:15: + Multiple declarations of ‘T’ + Declared at: TDPunning.hs:4:1 + TDPunning.hs:4:15 diff --git a/testsuite/tests/type-data/should_fail/TDRecordsGADT.hs b/testsuite/tests/type-data/should_fail/TDRecordsGADT.hs new file mode 100644 index 0000000000..0d9e6536c3 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDRecordsGADT.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE TypeData #-} +{-# LANGUAGE GADTs #-} +module TDRecordsGADT where + +type data Record a where + Cons :: { field :: a } -> Record a diff --git a/testsuite/tests/type-data/should_fail/TDRecordsGADT.stderr b/testsuite/tests/type-data/should_fail/TDRecordsGADT.stderr new file mode 100644 index 0000000000..8695163190 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDRecordsGADT.stderr @@ -0,0 +1,3 @@ + +TDRecordsGADT.hs:6:5: [GHC-67297] + Labelled fields are not allowed in type data declarations. diff --git a/testsuite/tests/type-data/should_fail/TDRecordsH98.hs b/testsuite/tests/type-data/should_fail/TDRecordsH98.hs new file mode 100644 index 0000000000..d6d805532f --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDRecordsH98.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE TypeData #-} +module TDRecordsH98 where + +type data Record a = Cons { field :: a } diff --git a/testsuite/tests/type-data/should_fail/TDRecordsH98.stderr b/testsuite/tests/type-data/should_fail/TDRecordsH98.stderr new file mode 100644 index 0000000000..c20a83dc73 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDRecordsH98.stderr @@ -0,0 +1,3 @@ + +TDRecordsH98.hs:4:22: [GHC-67297] + Labelled fields are not allowed in type data declarations. diff --git a/testsuite/tests/type-data/should_fail/TDRecursive.hs b/testsuite/tests/type-data/should_fail/TDRecursive.hs new file mode 100644 index 0000000000..b4a09c165e --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDRecursive.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE TypeData #-} +module TDRecursive where + +type data T f = K (f (K Int)) diff --git a/testsuite/tests/type-data/should_fail/TDRecursive.stderr b/testsuite/tests/type-data/should_fail/TDRecursive.stderr new file mode 100644 index 0000000000..8225bd1790 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDRecursive.stderr @@ -0,0 +1,7 @@ + +TDRecursive.hs:4:23: [GHC-88634] + Type constructor ‘K’ cannot be used here + (it is defined and used in the same recursive group) + In the first argument of ‘f’, namely ‘(K Int)’ + In the type ‘(f (K Int))’ + In the definition of data constructor ‘K’ diff --git a/testsuite/tests/type-data/should_fail/TDStrictnessGADT.hs b/testsuite/tests/type-data/should_fail/TDStrictnessGADT.hs new file mode 100644 index 0000000000..774c560e30 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDStrictnessGADT.hs @@ -0,0 +1,5 @@ +{-# LANGUAGE TypeData #-} +module TDStrictnessGADT where + +type data T a where + Cons :: !a -> T a diff --git a/testsuite/tests/type-data/should_fail/TDStrictnessGADT.stderr b/testsuite/tests/type-data/should_fail/TDStrictnessGADT.stderr new file mode 100644 index 0000000000..db235cd048 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDStrictnessGADT.stderr @@ -0,0 +1,3 @@ + +TDStrictnessGADT.hs:5:6: [GHC-67297] + Strictness flags are not allowed in type data declarations. diff --git a/testsuite/tests/type-data/should_fail/TDStrictnessH98.hs b/testsuite/tests/type-data/should_fail/TDStrictnessH98.hs new file mode 100644 index 0000000000..062df5bd02 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDStrictnessH98.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE TypeData #-} +module TDStrictnessH98 where + +type data T a = Cons !a diff --git a/testsuite/tests/type-data/should_fail/TDStrictnessH98.stderr b/testsuite/tests/type-data/should_fail/TDStrictnessH98.stderr new file mode 100644 index 0000000000..e0ccd5e456 --- /dev/null +++ b/testsuite/tests/type-data/should_fail/TDStrictnessH98.stderr @@ -0,0 +1,3 @@ + +TDStrictnessH98.hs:4:17: [GHC-67297] + Strictness flags are not allowed in type data declarations. diff --git a/testsuite/tests/type-data/should_fail/all.T b/testsuite/tests/type-data/should_fail/all.T new file mode 100644 index 0000000000..ddf7bd86bd --- /dev/null +++ b/testsuite/tests/type-data/should_fail/all.T @@ -0,0 +1,13 @@ +test('TDNoPragma', normal, compile_fail, ['']) +test('TDBadConsConstraint', normal, compile_fail, ['']) +test('TDDeriving', normal, compile_fail, ['']) +test('TDExpression', normal, compile_fail, ['']) +test('TDMultiple01', normal, compile_fail, ['']) +test('TDMultiple02', normal, compile_fail, ['']) +test('TDPattern', normal, compile_fail, ['']) +test('TDPunning', normal, compile_fail, ['']) +test('TDRecordsGADT', normal, compile_fail, ['']) +test('TDRecordsH98', normal, compile_fail, ['']) +test('TDRecursive', normal, compile_fail, ['']) +test('TDStrictnessGADT', normal, compile_fail, ['']) +test('TDStrictnessH98', normal, compile_fail, ['']) |