diff options
Diffstat (limited to 'testsuite/tests/ghc-regress/deriving/should_compile')
47 files changed, 0 insertions, 540 deletions
diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/Makefile b/testsuite/tests/ghc-regress/deriving/should_compile/Makefile deleted file mode 100644 index 1c39d1c1fe..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -TOP=../../../.. -include $(TOP)/mk/boilerplate.mk -include $(TOP)/mk/test.mk diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/T2378.hs b/testsuite/tests/ghc-regress/deriving/should_compile/T2378.hs deleted file mode 100644 index e3118cb863..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/T2378.hs +++ /dev/null @@ -1,10 +0,0 @@ -{-# LANGUAGE StandaloneDeriving, DeriveDataTypeable #-} -module Foo( T ) where - --- Trac 2378 - -import Data.Data - -newtype T f = MkT Int - -deriving instance Typeable1 T diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/T2856.hs b/testsuite/tests/ghc-regress/deriving/should_compile/T2856.hs deleted file mode 100644 index c8f81a00bc..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/T2856.hs +++ /dev/null @@ -1,28 +0,0 @@ -{-# LANGUAGE TypeFamilies, GeneralizedNewtypeDeriving, StandaloneDeriving, FlexibleInstances #-} - --- Test Trac #2856 - -module T2856 where - -import Data.Ratio - ----------------------- -class C a where - data D a - -instance C Bool where - newtype D Bool = DInt Int deriving (Eq, Show, Num) - -instance C a => C [a] where - newtype D [a] = DList (Ratio a) deriving (Eq, Show, Num) - ----------------------- -data family W a -newtype instance W Bool = WInt Int deriving( Eq, Show ) -newtype instance W [a] = WList (Ratio a) deriving( Eq, Show ) - -deriving instance Num (W Bool) -deriving instance (Integral a, Num a) => Num (W [a]) - -- Integral needed because superclass Eq needs it, - -- because of the stupid context on Ratio - diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/T3012.hs b/testsuite/tests/ghc-regress/deriving/should_compile/T3012.hs deleted file mode 100644 index 44b1d64a9c..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/T3012.hs +++ /dev/null @@ -1,10 +0,0 @@ -{-# LANGUAGE GADTs, StandaloneDeriving #-}
-
-module T3012 where
-
-data T a where
- Foo :: T Int
- Bar :: T Bool
-
-deriving instance Show (T a)
-
diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/T3057.hs b/testsuite/tests/ghc-regress/deriving/should_compile/T3057.hs deleted file mode 100644 index 0e9aef7814..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/T3057.hs +++ /dev/null @@ -1,6 +0,0 @@ -{-# LANGUAGE StandaloneDeriving, DeriveFunctor #-} -module T3057 where - -deriving instance Functor (Either a) - - diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/T3965.hs b/testsuite/tests/ghc-regress/deriving/should_compile/T3965.hs deleted file mode 100644 index 2ccaaadfdf..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/T3965.hs +++ /dev/null @@ -1,23 +0,0 @@ -{-# LANGUAGE DeriveDataTypeable, FlexibleContexts, StandaloneDeriving, TypeOperators, UndecidableInstances #-} -module T3965 where - -import Data.Data - -data T f e = Inl (f e) deriving (Data, Eq) - -instance (Typeable1 f) => Typeable1 (T f) where - typeOf1 _ = error "urk" - -newtype Expr f = In (f (Expr f)) -instance Typeable1 f => Typeable (Expr f) where - typeOf _ = error "urk" - -deriving instance (Typeable1 a, Data (a (Expr a))) => Data (Expr a) - -data Var e = Var String deriving (Data, Eq, Typeable) - -data Domain e g = Domain - (Expr (T Var)) - deriving (Data, Typeable) - - diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/T4220.hs b/testsuite/tests/ghc-regress/deriving/should_compile/T4220.hs deleted file mode 100644 index 0b2ba28caa..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/T4220.hs +++ /dev/null @@ -1,7 +0,0 @@ -{-# LANGUAGE EmptyDataDecls, DeriveFunctor, DeriveFoldable, DeriveTraversable #-} -module T4220 where - -import Data.Foldable -import Data.Traversable - -data Void a deriving (Functor, Foldable, Traversable) diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/T4302.hs b/testsuite/tests/ghc-regress/deriving/should_compile/T4302.hs deleted file mode 100644 index 50369632f9..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/T4302.hs +++ /dev/null @@ -1,18 +0,0 @@ -{-# LANGUAGE StandaloneDeriving, DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable, EmptyDataDecls #-} -module T4302 where - -import Data.Ix -import Data.Typeable -import Data.Data -import Data.Foldable -import Data.Traversable - -data Test a - -deriving instance Eq (Test a) -deriving instance Ord (Test a) -deriving instance Typeable1 Test -deriving instance Data a => Data (Test a) -deriving instance Functor Test -deriving instance Foldable Test -deriving instance Traversable Test diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/T4325.hs b/testsuite/tests/ghc-regress/deriving/should_compile/T4325.hs deleted file mode 100644 index 68ab81744b..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/T4325.hs +++ /dev/null @@ -1,7 +0,0 @@ -{-# LANGUAGE DatatypeContexts #-} - -module T4325 where - -data Ord a => Heap a b = Empty | Node a b [Heap a b] - deriving Eq - diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/T4325.stderr b/testsuite/tests/ghc-regress/deriving/should_compile/T4325.stderr deleted file mode 100644 index 90ef1de92d..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/T4325.stderr +++ /dev/null @@ -1,3 +0,0 @@ - -T4325.hs:1:14: - Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/T4816.hs b/testsuite/tests/ghc-regress/deriving/should_compile/T4816.hs deleted file mode 100644 index 0e81e39521..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/T4816.hs +++ /dev/null @@ -1,10 +0,0 @@ -{-# LANGUAGE DeriveFunctor #-} - -module T4816 where - -data Silly a = Sillly a - -data Baz o = Baz { - foo :: o, - bar :: Silly () - } deriving (Functor) diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/T4966.hs b/testsuite/tests/ghc-regress/deriving/should_compile/T4966.hs deleted file mode 100644 index d7328c6ef6..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/T4966.hs +++ /dev/null @@ -1,44 +0,0 @@ -{-# LANGUAGE DatatypeContexts #-} -{-# LANGUAGE EmptyDataDecls #-} -{-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE UndecidableInstances #-} -{-# LANGUAGE OverlappingInstances #-} - -module HTk.Toolkit.TreeList (getObjectFromTreeList) where - -class Eq c => CItem c - --- A bizarre instance decl! --- People who use instance decls like this are asking for trouble -instance GUIObject w => Eq w where - w1 == w2 = toGUIObject w1 == toGUIObject w2 - -data StateEntry a - = StateEntry (TreeListObject a) a -- Comment this 'a' out and it type checks - deriving Eq - --- The delicate point about this test is that we want to --- infer a derived instance decl like this: --- instance (CItem a, Eq a) => Eq (StateEntry a) --- But note the instance decl for (Eq w) for any w! --- There's a danger than we'll use that instance decl --- to get the derived instance --- instance (CItem a, GUIObject a) => Eq (StateEntry a) --- And then that doesn't work subsequently - -getObjectFromTreeList :: CItem a => StateEntry a -> Bool -getObjectFromTreeList state = state == state - -data CItem a => TreeListObject a - -instance CItem a => Eq (TreeListObject a) - -class GUIObject w where - toGUIObject :: w -> GUIOBJECT - - -data GUIOBJECT - -instance Eq GUIOBJECT where - (==) = undefined - (/=) = undefined diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/T4966.stderr b/testsuite/tests/ghc-regress/deriving/should_compile/T4966.stderr deleted file mode 100644 index b8059925bb..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/T4966.stderr +++ /dev/null @@ -1,3 +0,0 @@ - -T4966.hs:1:14: - Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/all.T b/testsuite/tests/ghc-regress/deriving/should_compile/all.T deleted file mode 100644 index 22353ab2ea..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/all.T +++ /dev/null @@ -1,32 +0,0 @@ -test('drv001', normal, compile, ['']) -test('drv002', normal, compile, ['']) -test('drv003', normal, compile, ['']) -test('drv004', normal, compile, ['']) -test('drv005', normal, compile, ['']) -test('drv006', normal, compile, ['']) -test('drv007', normal, compile, ['']) -test('drv008', normal, compile, ['']) -test('drv009', normal, compile, ['']) -test('drv010', normal, compile, ['']) -test('drv011', normal, compile, ['']) -test('drv012', normal, compile, ['']) -test('drv013', normal, compile, ['']) -test('drv014', normal, compile, ['']) -test('drv015', normal, compile, ['']) -test('drv020', normal, compile, ['']) -test('drv021', normal, compile, ['']) -test('deriving-1935', normal, compile, ['']) -test('T2378', normal, compile, ['']) -test('T2856', normal, compile, ['']) -test('T3057', normal, compile, ['']) -test('T3012', normal, compile, ['']) -test('T3965', normal, compile, ['']) -test('T4220', normal, compile, ['']) -test('T4302', normal, compile, ['']) -test('T4325', normal, compile, ['']) -test('T4816', normal, compile, ['']) -test('T4966', normal, compile, ['']) - -test('drv-functor1', normal, compile, ['']) -test('drv-functor2', normal, compile, ['']) -test('drv-foldable-traversable1', normal, compile, ['']) diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/deriving-1935.hs b/testsuite/tests/ghc-regress/deriving/should_compile/deriving-1935.hs deleted file mode 100644 index 5b3bca0c77..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/deriving-1935.hs +++ /dev/null @@ -1,22 +0,0 @@ -{-# OPTIONS_GHC -XDeriveDataTypeable #-} - --- Trac #1935 --- See Note [Superclasses of derived instance] in TcDeriv - -module Foo where - - import Data.Data - - data Foo a = Foo - deriving (Data, Typeable) - - data T a = MkT (S a) deriving( Ord ) - - instance Num a => Eq (T a) - - data S a = S - instance Eq (S a) - instance Ord (S a) - - -
\ No newline at end of file diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv-foldable-traversable1.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv-foldable-traversable1.hs deleted file mode 100644 index 712f14a3b5..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv-foldable-traversable1.hs +++ /dev/null @@ -1,33 +0,0 @@ -{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-} -{-# LANGUAGE RankNTypes #-} -{-# LANGUAGE FlexibleContexts, DatatypeContexts #-} - -module ShouldCompile where - -import Data.Foldable -import Data.Traversable - -data Trivial a = Trivial - deriving (Functor,Foldable,Traversable) - --- lots of different things -data Strange a b c - = T1 a b c - | T2 c c c - | T3 [a] [b] [c] -- lists - | T4 [[a]] [[b]] [[c]] -- nested lists - | T5 (c,(b,b),(c,c)) -- tuples - | T6 ([c],Strange a b c) -- tycons - deriving (Functor,Foldable,Traversable) - -data NotPrimitivelyRecursive a - = S1 (NotPrimitivelyRecursive (a,a)) - | S2 a - deriving (Functor,Foldable,Traversable) - -data Eq a => StupidConstraint a b = Stupid a b - deriving (Functor,Foldable,Traversable) - --- requires Foldable/Traversable constraint on f and g -data Compose f g a = Compose (f (g a)) - deriving (Functor,Foldable,Traversable) diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv-foldable-traversable1.stderr b/testsuite/tests/ghc-regress/deriving/should_compile/drv-foldable-traversable1.stderr deleted file mode 100644 index ceae10cabd..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv-foldable-traversable1.stderr +++ /dev/null @@ -1,3 +0,0 @@ - -drv-foldable-traversable1.hs:3:32: - Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv-functor1.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv-functor1.hs deleted file mode 100644 index 8249858cae..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv-functor1.hs +++ /dev/null @@ -1,65 +0,0 @@ -{-# LANGUAGE DeriveFunctor #-} -{-# LANGUAGE ExistentialQuantification #-} -{-# LANGUAGE RankNTypes #-} -{-# LANGUAGE FlexibleContexts #-} -{-# LANGUAGE DatatypeContexts #-} - -module ShouldCompile where - -data Trivial a = Trivial - deriving (Functor) - -data Fun a = Fun (Int -> a) - deriving (Functor) - --- lots of different things -data Strange a b c - = T1 a b c - | T2 [a] [b] [c] -- lists - | T3 [[a]] [[b]] [[c]] -- nested lists - | T4 (c,(b,b),(c,c)) -- tuples - | T5 ([c],Strange a b c) -- tycons - | T6 (Int -> c) -- function types - | T7 (a -> (c,a)) -- functions and tuples - | T8 ((c -> a) -> a) -- continuation - deriving (Functor) - -data NotPrimitivelyRecursive a - = S1 (NotPrimitivelyRecursive (a,a)) - | S2 a - deriving (Functor,Eq) - -data Eq a => StupidConstraint a b = Stupid a b - deriving (Functor) - --- requires Functor constraint on f and g -data Compose f g a = Compose (f (g a)) - deriving (Functor) - --- We can't derive Functor for the following type. --- it needs both (Functor (f Int)) and (Functor (f Bool)) --- i.e.: --- instance (Functor (f Bool), Functor (f Int)) => Functor (ComplexConstraint f) --- This requires FlexibleContexts and UndecidableInstances -data ComplexConstraint f a = ComplexContraint (f Int (f Bool a,a)) --- deriving (Functor) - -data Universal a - = Universal (forall b. (b,[a])) - | Universal2 (forall f. Functor f => (f a)) - | Universal3 (forall a. a -> Int) -- reuse a - | NotReallyUniversal (forall b. a) - deriving (Functor) - --- Ghc doesn't allow deriving for non-Haskell98 data constructors -data Existential b - = forall a. ExistentialList [a] - | forall f. Functor f => ExistentialFunctor (f b) - | forall b. SneakyUseSameName (b -> Bool) - -- deriving (Functor) - --- Don't get confused by synonyms -type IntFun a = Int -> a -data IntFunD a = IntFunD (IntFun a) - deriving (Functor) - diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv-functor1.stderr b/testsuite/tests/ghc-regress/deriving/should_compile/drv-functor1.stderr deleted file mode 100644 index a531dc56ef..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv-functor1.stderr +++ /dev/null @@ -1,3 +0,0 @@ - -drv-functor1.hs:5:14: - Warning: -XDatatypeContexts is deprecated: It was widely considered a misfeature, and has been removed from the Haskell language. diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv-functor2.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv-functor2.hs deleted file mode 100644 index d070feb06d..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv-functor2.hs +++ /dev/null @@ -1,9 +0,0 @@ -{-# LANGUAGE GeneralizedNewtypeDeriving #-} - -module ShouldCompile where - --- Deriving Functor should still work with GeneralizedNewtypeDeriving instead of DeriveFunctor - -newtype List a = List [a] - deriving (Functor) - diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv001.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv001.hs deleted file mode 100644 index 694af6a50f..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv001.hs +++ /dev/null @@ -1,21 +0,0 @@ --- !!! canonical weird example for "deriving" -module ShouldSucceed where - -data X a b - = C1 (T a) - | C2 (Y b) - | C3 (X b a) - deriving (Read, Show) - -data Y b - = D1 - | D2 (X Int b) - deriving (Read, Show) - -data T a - = E1 - -instance Eq a => Show (T a) where - showsPrec = error "show" -instance Eq a => Read (T a) where - readsPrec = error "read" diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv001.stderr b/testsuite/tests/ghc-regress/deriving/should_compile/drv001.stderr deleted file mode 100644 index e69de29bb2..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv001.stderr +++ /dev/null diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv002.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv002.hs deleted file mode 100644 index 15eb2d9ecc..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv002.hs +++ /dev/null @@ -1,14 +0,0 @@ -module ShouldSucceed where - -data Z a b - = C1 (T a) - | C2 (Z [a] [b]) - deriving (Show, Read) - -data T a - = E1 - -instance Eq a => Show (T a) where - showsPrec = error "show" -instance Eq a => Read (T a) where - readsPrec = error "read" diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv002.stderr b/testsuite/tests/ghc-regress/deriving/should_compile/drv002.stderr deleted file mode 100644 index e69de29bb2..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv002.stderr +++ /dev/null diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv003.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv003.hs deleted file mode 100644 index 0b8149ce8a..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv003.hs +++ /dev/null @@ -1,17 +0,0 @@ --- !!! This is the example given in TcDeriv --- -module ShouldSucceed where - -data T a b - = C1 (Foo a) (Bar b) - | C2 Int (T b a) - | C3 (T a a) - deriving Eq - -data Foo a = MkFoo Double a deriving () -instance (Eq a) => Eq (Foo a) - -data Bar a = MkBar Int Int deriving () -instance (Ping b) => Eq (Bar b) - -class Ping a diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv003.stderr b/testsuite/tests/ghc-regress/deriving/should_compile/drv003.stderr deleted file mode 100644 index e69de29bb2..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv003.stderr +++ /dev/null diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv004.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv004.hs deleted file mode 100644 index 324a7f81d4..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv004.hs +++ /dev/null @@ -1,9 +0,0 @@ --- !!! simple example of deriving Ord and Eq simultaneously --- -module ShouldSucceed where - -data Foo a b c - = C1 a Int - | C2 b Double - | C3 c String - deriving (Eq, Ord) diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv004.stderr b/testsuite/tests/ghc-regress/deriving/should_compile/drv004.stderr deleted file mode 100644 index e69de29bb2..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv004.stderr +++ /dev/null diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv005.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv005.hs deleted file mode 100644 index 527dde98b9..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv005.hs +++ /dev/null @@ -1,6 +0,0 @@ --- !!! simple example of deriving Enum --- -module ShouldSucceed where - -data Foo = Foo1 | Foo2 | Foo3 | Foo4 | Foo5 | Foo6 | Foo7 | Foo8 - deriving Enum diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv005.stderr b/testsuite/tests/ghc-regress/deriving/should_compile/drv005.stderr deleted file mode 100644 index e69de29bb2..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv005.stderr +++ /dev/null diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv006.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv006.hs deleted file mode 100644 index 62f2cbcf67..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv006.hs +++ /dev/null @@ -1,9 +0,0 @@ --- !!! simple examples of deriving Ix --- -module ShouldSucceed where -import Data.Ix - -data Foo = Foo1 | Foo2 | Foo3 | Foo4 | Foo5 | Foo6 | Foo7 | Foo8 - deriving (Eq, Ord, Ix, Show) - -data Bar a b = MkBar a Int b Integer a diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv006.stderr b/testsuite/tests/ghc-regress/deriving/should_compile/drv006.stderr deleted file mode 100644 index e69de29bb2..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv006.stderr +++ /dev/null diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv007.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv007.hs deleted file mode 100644 index 22da5b4aa3..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv007.hs +++ /dev/null @@ -1,6 +0,0 @@ --- !!! deriving Ord on d. type with a single nullary constructor. --- (from ghc-2.10 panic - as reported by Sergey Mechveliani <mechvel@botik.ru>) --- -module ShouldSucceed where - -data D = D deriving (Eq,Ord) diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv007.stderr b/testsuite/tests/ghc-regress/deriving/should_compile/drv007.stderr deleted file mode 100644 index e69de29bb2..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv007.stderr +++ /dev/null diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv008.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv008.hs deleted file mode 100644 index b615809caa..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv008.hs +++ /dev/null @@ -1,7 +0,0 @@ --- !!! deriving Ix on d. type with nullary constructors -module ShouldSucceed where - -import Data.Ix - -data AD = A | B | C | D deriving (Show, Ord, Eq, Ix) - diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv008.stderr b/testsuite/tests/ghc-regress/deriving/should_compile/drv008.stderr deleted file mode 100644 index e69de29bb2..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv008.stderr +++ /dev/null diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv009.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv009.hs deleted file mode 100644 index 4ac069d30c..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv009.hs +++ /dev/null @@ -1,6 +0,0 @@ --- !!! deriving Ix on d. type with one constructor -module ShouldSucceed where - -import Data.Ix - -data Pair a b = Pair a b deriving (Show, Ord, Eq, Ix) diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv009.stderr b/testsuite/tests/ghc-regress/deriving/should_compile/drv009.stderr deleted file mode 100644 index e69de29bb2..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv009.stderr +++ /dev/null diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv010.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv010.hs deleted file mode 100644 index 1a3f9dc33a..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv010.hs +++ /dev/null @@ -1,4 +0,0 @@ --- !!! deriving Enum on d. type with nullary constructors -module ShouldSucceed where - -data AD = A | B | C | D deriving (Enum) diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv010.stderr b/testsuite/tests/ghc-regress/deriving/should_compile/drv010.stderr deleted file mode 100644 index e69de29bb2..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv010.stderr +++ /dev/null diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv011.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv011.hs deleted file mode 100644 index bba25f5cae..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv011.hs +++ /dev/null @@ -1,6 +0,0 @@ --- !!! deriving Enum, but not Ord. -module ShouldSucceed where - -data ABC = A | B | C deriving Enum - -x = [A ..C] diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv012.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv012.hs deleted file mode 100644 index eb8f3847cd..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv012.hs +++ /dev/null @@ -1,10 +0,0 @@ -{-# LANGUAGE GADTs #-} - --- !!! deriving for GADTs which declare Haskell98 data types. --- bug reported as http://hackage.haskell.org/trac/ghc/ticket/902 -module ShouldSucceed where - -data Maybe1 a where { - Nothing1 :: Maybe1 a ; - Just1 :: a -> Maybe1 a - } deriving (Eq,Ord) diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv013.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv013.hs deleted file mode 100644 index 1686bcc232..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv013.hs +++ /dev/null @@ -1,11 +0,0 @@ -{-# LANGUAGE DeriveDataTypeable #-} - --- Deriving Typeable has various special cases -module Foo where - -import Data.Typeable - -data Foo1 = Foo1 deriving( Typeable ) -data Foo2 a = Foo2 a deriving( Typeable ) -data Foo3 a b = Foo3 a b deriving( Typeable ) - diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv014.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv014.hs deleted file mode 100644 index 12e2a15b3f..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv014.hs +++ /dev/null @@ -1,11 +0,0 @@ -{-# LANGUAGE StandaloneDeriving, GeneralizedNewtypeDeriving #-} - -module ShouldCompile where - -data T a = T1 a | T2 -newtype N = MkN Int - -deriving instance Eq a => Eq (T a) -deriving instance Num N -deriving instance Eq N -deriving instance Show N diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv015.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv015.hs deleted file mode 100644 index f8cfbce2db..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv015.hs +++ /dev/null @@ -1,14 +0,0 @@ - --- July 07: I'm changing this from "should_compile" to "should_fail". --- It would generate an instance decl like --- insance (Show (f a), Show (g a)) => Show (Pair1 f g a) --- and that is not Haskell 98. --- --- See Note [Exotic derived instance contexts] in TcSimplify. --- The rule is simple: the context of a derived instance decl must --- contain constraints of form (C tyvar) only, just as H98. - -module ShouldCompile where - -newtype Pair1 f g a = Pair1 {unPair1 :: (f a, g a)} - deriving (Eq, Ord, Show) diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv020.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv020.hs deleted file mode 100644 index 8794b745e5..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv020.hs +++ /dev/null @@ -1,34 +0,0 @@ -{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, - FlexibleInstances, GeneralizedNewtypeDeriving #-} - --- Test deriving of a multi-parameter class for --- one-argument newtype defined in the same module -module ShouldSucceed where - --- library stuff - -class Monad m => MonadState s m | m -> s where - get :: m s - put :: s -> m () - -newtype State s a = State { - runState :: (s -> (a, s)) - } - -instance Monad (State s) where - return a = State $ \s -> (a, s) - m >>= k = State $ \s -> let - (a, s') = runState m s - in runState (k a) s' - -instance MonadState s (State s) where - get = State $ \s -> (s, s) - put s = State $ \_ -> ((), s) - --- test code - -newtype Foo a = MkFoo (State Int a) - deriving (Monad, MonadState Int) - -f :: Foo Int -f = get diff --git a/testsuite/tests/ghc-regress/deriving/should_compile/drv021.hs b/testsuite/tests/ghc-regress/deriving/should_compile/drv021.hs deleted file mode 100644 index c9800508de..0000000000 --- a/testsuite/tests/ghc-regress/deriving/should_compile/drv021.hs +++ /dev/null @@ -1,16 +0,0 @@ -{-# OPTIONS_GHC -XDeriveDataTypeable -XStandaloneDeriving #-} - --- See Trac #1825 --- Test stand-alone deriving for Typeable --- Horridly, one needs to define instance for Typeable1 etc - -module ShouldCompile where - -import Data.Typeable - -data T1 a = T1 a -data T2 a b = T2 a b - -deriving instance Typeable1 T1 -deriving instance Typeable2 T2 - |