diff options
Diffstat (limited to 'testsuite/tests/rename/should_compile')
164 files changed, 3642 insertions, 0 deletions
diff --git a/testsuite/tests/rename/should_compile/2334.hs b/testsuite/tests/rename/should_compile/2334.hs new file mode 100644 index 0000000000..6c1cd80e1f --- /dev/null +++ b/testsuite/tests/rename/should_compile/2334.hs @@ -0,0 +1,7 @@ +{-# LANGUAGE TypeFamilies,EmptyDataDecls,MultiParamTypeClasses #-} +module Test where + +type family Fam1 a + +class C b where + f :: ( Fam1 s ~ () ) => b -> s diff --git a/testsuite/tests/rename/should_compile/Imp100Aux.hs b/testsuite/tests/rename/should_compile/Imp100Aux.hs new file mode 100644 index 0000000000..2ae5f0baa4 --- /dev/null +++ b/testsuite/tests/rename/should_compile/Imp100Aux.hs @@ -0,0 +1,14 @@ + +module Imp100Aux where +import Imp100 + +data T1 a +data T2 a b +data T3 a b c +data T4 a b c d +data T5 a b c d e +data T6 a +data T7 a b +data T8 a b c +data T9 a b c d +data T10 a b c d e diff --git a/testsuite/tests/rename/should_compile/Imp100Aux.hs-boot b/testsuite/tests/rename/should_compile/Imp100Aux.hs-boot new file mode 100644 index 0000000000..934db61841 --- /dev/null +++ b/testsuite/tests/rename/should_compile/Imp100Aux.hs-boot @@ -0,0 +1,11 @@ +module Imp100Aux where +data T1 a +data T2 a b +data T3 a b c +data T4 a b c d +data T5 a b c d e +data T6 a +data T7 a b +data T8 a b c +data T9 a b c d +data T10 a b c d e diff --git a/testsuite/tests/rename/should_compile/Imp10Aux.hs b/testsuite/tests/rename/should_compile/Imp10Aux.hs new file mode 100644 index 0000000000..f838aa558d --- /dev/null +++ b/testsuite/tests/rename/should_compile/Imp10Aux.hs @@ -0,0 +1,13 @@ + +module Imp10Aux where +import Imp10 +data T1 a +data T2 a b +data T3 a b c +data T4 a b c d +data T5 a b c d e +data T6 a +data T7 a b +data T8 a b c +data T9 a b c d +data T10 a b c d e diff --git a/testsuite/tests/rename/should_compile/Imp10Aux.hs-boot b/testsuite/tests/rename/should_compile/Imp10Aux.hs-boot new file mode 100644 index 0000000000..248c113ba2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/Imp10Aux.hs-boot @@ -0,0 +1,11 @@ +module Imp10Aux where +data T1 a +data T2 a b +data T3 a b c +data T4 a b c d +data T5 a b c d e +data T6 a +data T7 a b +data T8 a b c +data T9 a b c d +data T10 a b c d e diff --git a/testsuite/tests/rename/should_compile/Imp500Aux.hs b/testsuite/tests/rename/should_compile/Imp500Aux.hs new file mode 100644 index 0000000000..20c3c79415 --- /dev/null +++ b/testsuite/tests/rename/should_compile/Imp500Aux.hs @@ -0,0 +1,14 @@ + +module Imp500Aux where +import Imp500 + +data T1 a +data T2 a b +data T3 a b c +data T4 a b c d +data T5 a b c d e +data T6 a +data T7 a b +data T8 a b c +data T9 a b c d +data T10 a b c d e diff --git a/testsuite/tests/rename/should_compile/Imp500Aux.hs-boot b/testsuite/tests/rename/should_compile/Imp500Aux.hs-boot new file mode 100644 index 0000000000..251ac8012c --- /dev/null +++ b/testsuite/tests/rename/should_compile/Imp500Aux.hs-boot @@ -0,0 +1,11 @@ +module Imp500Aux where +data T1 a +data T2 a b +data T3 a b c +data T4 a b c d +data T5 a b c d e +data T6 a +data T7 a b +data T8 a b c +data T9 a b c d +data T10 a b c d e diff --git a/testsuite/tests/rename/should_compile/Makefile b/testsuite/tests/rename/should_compile/Makefile new file mode 100644 index 0000000000..5823823c06 --- /dev/null +++ b/testsuite/tests/rename/should_compile/Makefile @@ -0,0 +1,44 @@ +TOP=../../.. +include $(TOP)/mk/boilerplate.mk +include $(TOP)/mk/test.mk + +T1792_imports: + $(RM) T1792_imports.hi T1792_imports.o T1792_imports.imports + '$(TEST_HC)' $(TEST_HC_OPTS) -ddump-minimal-imports -c T1792_imports.hs + cat T1792_imports.imports + +T3823: + $(RM) T3823A.hi-boot T3823A.hi T3823B.hi + $(RM) T3823A.o-boot T3823A.o T3823B.o + -'$(TEST_HC)' $(TEST_HC_OPTS) -v0 --make T3823A.hs + +T4003: + $(RM) T4003A.hi-boot T4003A.hi T4003B.hi + $(RM) T4003A.o-boot T4003A.o T4003B.o + '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T4003A.hs-boot + '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T4003B.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -O -c T4003A.hs + +T3449: + $(RM) T3449.hi-boot T3449.hi T3449A.hi + $(RM) T3449.o-boot T3449.o T3449A.o + '$(TEST_HC)' $(TEST_HC_OPTS) -Wall -c T3449.hs-boot + '$(TEST_HC)' $(TEST_HC_OPTS) -Wall -c T3449A.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -Wall -c T3449.hs + +T4239: + $(RM) T4239A.hi T4239A.o + $(RM) T4239.hi T4239.o T4239.imports + '$(TEST_HC)' $(TEST_HC_OPTS) -c T4239A.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c T4239.hs -ddump-minimal-imports + cat T4239.imports + +T4240: + $(RM) T4240A.hi T4240A.o + $(RM) T4240B.hi T4240B.o + $(RM) T4240.hi T4240.o T4240.imports + '$(TEST_HC)' $(TEST_HC_OPTS) -c T4240A.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c T4240B.hs + '$(TEST_HC)' $(TEST_HC_OPTS) -c T4240.hs -ddump-minimal-imports + cat T4240.imports + diff --git a/testsuite/tests/rename/should_compile/Rn042_A.hs b/testsuite/tests/rename/should_compile/Rn042_A.hs new file mode 100644 index 0000000000..ea19a1a3f8 --- /dev/null +++ b/testsuite/tests/rename/should_compile/Rn042_A.hs @@ -0,0 +1,3 @@ +module Rn042_A( Type(..) ) where + +data Type a = Constr { field :: a } diff --git a/testsuite/tests/rename/should_compile/Rn043_A.hs b/testsuite/tests/rename/should_compile/Rn043_A.hs new file mode 100644 index 0000000000..ab24017637 --- /dev/null +++ b/testsuite/tests/rename/should_compile/Rn043_A.hs @@ -0,0 +1,3 @@ +module Rn043_A where + +x = True diff --git a/testsuite/tests/rename/should_compile/Rn043_B.hs b/testsuite/tests/rename/should_compile/Rn043_B.hs new file mode 100644 index 0000000000..b7f49f4143 --- /dev/null +++ b/testsuite/tests/rename/should_compile/Rn043_B.hs @@ -0,0 +1,3 @@ +module Rn043_B where + +x = 'x' diff --git a/testsuite/tests/rename/should_compile/Rn044_A.hs b/testsuite/tests/rename/should_compile/Rn044_A.hs new file mode 100644 index 0000000000..475ffe83cb --- /dev/null +++ b/testsuite/tests/rename/should_compile/Rn044_A.hs @@ -0,0 +1,3 @@ +module Rn044_A where + +x = True diff --git a/testsuite/tests/rename/should_compile/Rn044_B.hs b/testsuite/tests/rename/should_compile/Rn044_B.hs new file mode 100644 index 0000000000..e11f03c10b --- /dev/null +++ b/testsuite/tests/rename/should_compile/Rn044_B.hs @@ -0,0 +1,3 @@ +module Rn044_B where + +x = 'x' diff --git a/testsuite/tests/rename/should_compile/Rn050_A.hs b/testsuite/tests/rename/should_compile/Rn050_A.hs new file mode 100644 index 0000000000..d4e1f55c7c --- /dev/null +++ b/testsuite/tests/rename/should_compile/Rn050_A.hs @@ -0,0 +1,10 @@ +module Rn050_A where + +{-# DEPRECATED C "Use D instead" #-} +{-# DEPRECATED op "Use bop instead" #-} + +data T = C | D + +class Foo a where + op :: a -> a + bop :: a -> a diff --git a/testsuite/tests/rename/should_compile/Rn052Aux.hs b/testsuite/tests/rename/should_compile/Rn052Aux.hs new file mode 100644 index 0000000000..748da06728 --- /dev/null +++ b/testsuite/tests/rename/should_compile/Rn052Aux.hs @@ -0,0 +1,6 @@ + +module Rn052Aux where + +class C a where + f :: a -> Bool + diff --git a/testsuite/tests/rename/should_compile/Rn053_A.hs b/testsuite/tests/rename/should_compile/Rn053_A.hs new file mode 100644 index 0000000000..d454462034 --- /dev/null +++ b/testsuite/tests/rename/should_compile/Rn053_A.hs @@ -0,0 +1,5 @@ + +module Rn053_A where + +data D = C1 | C2 + diff --git a/testsuite/tests/rename/should_compile/Rn053_B.hs b/testsuite/tests/rename/should_compile/Rn053_B.hs new file mode 100644 index 0000000000..49603e8543 --- /dev/null +++ b/testsuite/tests/rename/should_compile/Rn053_B.hs @@ -0,0 +1,5 @@ + +module Rn053_B where + +data D = C1 | C2 + diff --git a/testsuite/tests/rename/should_compile/Rn059_A.hs b/testsuite/tests/rename/should_compile/Rn059_A.hs new file mode 100644 index 0000000000..ddebd78b11 --- /dev/null +++ b/testsuite/tests/rename/should_compile/Rn059_A.hs @@ -0,0 +1,5 @@ + +module Rn059_A where + +data A = A { label :: Char } + diff --git a/testsuite/tests/rename/should_compile/Rn059_B.hs b/testsuite/tests/rename/should_compile/Rn059_B.hs new file mode 100644 index 0000000000..df93ae3688 --- /dev/null +++ b/testsuite/tests/rename/should_compile/Rn059_B.hs @@ -0,0 +1,5 @@ + +module Rn059_B where + +data B = B { label :: Char } + diff --git a/testsuite/tests/rename/should_compile/Rn065A.hs b/testsuite/tests/rename/should_compile/Rn065A.hs new file mode 100644 index 0000000000..4c6ff53cd4 --- /dev/null +++ b/testsuite/tests/rename/should_compile/Rn065A.hs @@ -0,0 +1,4 @@ + +module Rn065A where + +data T = T { a :: Int } diff --git a/testsuite/tests/rename/should_compile/Rn066_A.hs b/testsuite/tests/rename/should_compile/Rn066_A.hs new file mode 100644 index 0000000000..c6624c3c67 --- /dev/null +++ b/testsuite/tests/rename/should_compile/Rn066_A.hs @@ -0,0 +1,10 @@ +module Rn066_A where + +{-# WARNING C "Are you sure you want to do that?" #-} +{-# WARNING op "Is that really a good idea?" #-} + +data T = C | D + +class Foo a where + op :: a -> a + bop :: a -> a diff --git a/testsuite/tests/rename/should_compile/Rn067_A.hs b/testsuite/tests/rename/should_compile/Rn067_A.hs new file mode 100644 index 0000000000..8d7958d64c --- /dev/null +++ b/testsuite/tests/rename/should_compile/Rn067_A.hs @@ -0,0 +1,4 @@ +module Rn067_A where + +x = True + diff --git a/testsuite/tests/rename/should_compile/RnAux017.hs b/testsuite/tests/rename/should_compile/RnAux017.hs new file mode 100644 index 0000000000..5514524fee --- /dev/null +++ b/testsuite/tests/rename/should_compile/RnAux017.hs @@ -0,0 +1,14 @@ +module RnAux017 where +import Test -- Import main module so there really is a loop + -- (avoid warning message) +data Wibble = Wibble +data Wobble = Wobble + +a :: Int -> Int +a = undefined + +b :: Int -> Int +b = undefined + +c :: Int -> Int +c = undefined diff --git a/testsuite/tests/rename/should_compile/RnAux017.hs-boot b/testsuite/tests/rename/should_compile/RnAux017.hs-boot new file mode 100644 index 0000000000..a2f3cd3916 --- /dev/null +++ b/testsuite/tests/rename/should_compile/RnAux017.hs-boot @@ -0,0 +1,8 @@ +module RnAux017 where + +data Wibble +data Wobble + +a :: Int -> Int +b :: Int -> Int +c :: Int -> Int diff --git a/testsuite/tests/rename/should_compile/T1074b.hs b/testsuite/tests/rename/should_compile/T1074b.hs new file mode 100644 index 0000000000..f236e9b52e --- /dev/null +++ b/testsuite/tests/rename/should_compile/T1074b.hs @@ -0,0 +1,4 @@ + +module Foo (Monad(..)) where + +import Prelude (Monad((>>=), return)) diff --git a/testsuite/tests/rename/should_compile/T1789.hs b/testsuite/tests/rename/should_compile/T1789.hs new file mode 100644 index 0000000000..efe3840e4f --- /dev/null +++ b/testsuite/tests/rename/should_compile/T1789.hs @@ -0,0 +1,11 @@ +{-# OPTIONS_GHC -fwarn-missing-import-lists #-} + +-- Test Trac #1789 +module T1789 where + +import Prelude +import Data.Map +import Data.Map (size) +import Data.Maybe (Maybe(..)) +import Data.Maybe hiding (isJust) +import qualified Data.Set as Set
\ No newline at end of file diff --git a/testsuite/tests/rename/should_compile/T1789.stderr b/testsuite/tests/rename/should_compile/T1789.stderr new file mode 100644 index 0000000000..dc9a794935 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T1789.stderr @@ -0,0 +1,12 @@ + +T1789.hs:6:1: + Warning: The module `Prelude' does not have an explicit import list + +T1789.hs:7:1: + Warning: The module `Data.Map' does not have an explicit import list + +T1789.hs:9:1: + Warning: The import item `Maybe(..)' does not have an explicit import list + +T1789.hs:10:1: + Warning: The module `Data.Maybe' does not have an explicit import list diff --git a/testsuite/tests/rename/should_compile/T1789_2.hs b/testsuite/tests/rename/should_compile/T1789_2.hs new file mode 100644 index 0000000000..2ac2a509fe --- /dev/null +++ b/testsuite/tests/rename/should_compile/T1789_2.hs @@ -0,0 +1,8 @@ +{-# OPTIONS_GHC -fwarn-missing-import-lists #-} + +-- Test Trac #1789 +module T1789_2 where + +import Data.Map (size) +import Data.Maybe (Maybe(Just, Nothing)) +import qualified Data.Set as Set (insert) diff --git a/testsuite/tests/rename/should_compile/T1792_imports.hs b/testsuite/tests/rename/should_compile/T1792_imports.hs new file mode 100644 index 0000000000..8830bd03e8 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T1792_imports.hs @@ -0,0 +1,6 @@ + +module T1792_imports (B.putStr, z, zipWith) where + +import qualified Data.ByteString as B (putStr, readFile, zip, zipWith) + +z = B.readFile diff --git a/testsuite/tests/rename/should_compile/T1792_imports.stdout b/testsuite/tests/rename/should_compile/T1792_imports.stdout new file mode 100644 index 0000000000..b497d12ec6 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T1792_imports.stdout @@ -0,0 +1 @@ +import qualified Data.ByteString as B ( putStr, readFile ) diff --git a/testsuite/tests/rename/should_compile/T1954.hs b/testsuite/tests/rename/should_compile/T1954.hs new file mode 100644 index 0000000000..07bfa3a3e8 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T1954.hs @@ -0,0 +1,6 @@ +{-# LANGUAGE GeneralizedNewtypeDeriving #-} +{-# OPTIONS_GHC -Wall -Werror #-} +module Bug(P) where + +newtype P a = P (IO a) deriving Monad + diff --git a/testsuite/tests/rename/should_compile/T1972.hs b/testsuite/tests/rename/should_compile/T1972.hs new file mode 100644 index 0000000000..09dd8acaf4 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T1972.hs @@ -0,0 +1,20 @@ +{-# OPTIONS_GHC -fwarn-name-shadowing -fwarn-unused-binds #-} + +-- Trac #1972 + +module Temp where + +import Data.List + +data Data = Data {name :: String} + +h :: a -> a +h name = name + +f mapAccumL x = x + +mapAccumL y = y + +test x = a+b + where + (a,b,c) = x
\ No newline at end of file diff --git a/testsuite/tests/rename/should_compile/T1972.stderr b/testsuite/tests/rename/should_compile/T1972.stderr new file mode 100644 index 0000000000..4f9344c4bc --- /dev/null +++ b/testsuite/tests/rename/should_compile/T1972.stderr @@ -0,0 +1,11 @@ + +T1972.hs:12:3: + Warning: This binding for `name' shadows the existing binding + defined at T1972.hs:9:19 + +T1972.hs:14:3: + Warning: This binding for `mapAccumL' shadows the existing bindings + defined at T1972.hs:16:1 + imported from Data.List at T1972.hs:7:1-16 + +T1972.hs:20:10: Warning: Defined but not used: `c' diff --git a/testsuite/tests/rename/should_compile/T2205.hs b/testsuite/tests/rename/should_compile/T2205.hs new file mode 100644 index 0000000000..580dea247a --- /dev/null +++ b/testsuite/tests/rename/should_compile/T2205.hs @@ -0,0 +1,17 @@ +{-# OPTIONS_GHC -XTypeOperators #-} + +-- Test fixity of type operators +-- Trac #2205 + +module ShouldCompile where + + infixr 0 :-> + data a :-> b = P a b + + fst3:: (a :-> (b :-> c)) -> a + fst3 (P a (P b c)) = a + + + fst3':: (a :-> b :-> c) -> a + fst3' (P a (P b c)) = a + diff --git a/testsuite/tests/rename/should_compile/T2436.hs b/testsuite/tests/rename/should_compile/T2436.hs new file mode 100644 index 0000000000..5cfd64100a --- /dev/null +++ b/testsuite/tests/rename/should_compile/T2436.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE TypeFamilies #-}
+{-# OPTIONS_GHC -fwarn-duplicate-exports #-}
+
+module T2436( C(..), T(..), module T2436a, S(..) ) where
+
+import T2436a
+
+class C a where
+ data T a
+
+instance C Int where
+ data T Int = TInt Int
+
+data instance S Int = SInt
\ No newline at end of file diff --git a/testsuite/tests/rename/should_compile/T2436a.hs b/testsuite/tests/rename/should_compile/T2436a.hs new file mode 100644 index 0000000000..4813fd918d --- /dev/null +++ b/testsuite/tests/rename/should_compile/T2436a.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE TypeFamilies #-}
+module T2436a( S ) where
+
+data family S a
\ No newline at end of file diff --git a/testsuite/tests/rename/should_compile/T2506.hs b/testsuite/tests/rename/should_compile/T2506.hs new file mode 100644 index 0000000000..1e31a12c12 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T2506.hs @@ -0,0 +1,6 @@ +-- Trac #2506 + +module ShouldCompile where +import Control.Exception (assert) + +foo = True `assert` () diff --git a/testsuite/tests/rename/should_compile/T2914.hs b/testsuite/tests/rename/should_compile/T2914.hs new file mode 100644 index 0000000000..788efef59d --- /dev/null +++ b/testsuite/tests/rename/should_compile/T2914.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE TypeFamilies, RecordWildCards #-} +module AssocWildCards where + +class FooClass a where + data FooType a + +instance FooClass Int where + data FooType Int = FooInt { fooIntVal :: Int } + +fooInt :: Int -> FooType Int +fooInt fooIntVal = FooInt{..} + +fromFooInt :: FooType Int -> Int +fromFooInt (FooInt{..}) = fooIntVal diff --git a/testsuite/tests/rename/should_compile/T3221.hs b/testsuite/tests/rename/should_compile/T3221.hs new file mode 100644 index 0000000000..5550fd3fa7 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T3221.hs @@ -0,0 +1,8 @@ +{-# OPTIONS_GHC -Werror -fwarn-unused-binds #-} + +-- Test Trac #3221: the constructors are used by the deriving +-- clause, even though they are not exported + +module T3221( Foo ) where + +data Foo = Bar | Baz deriving (Show,Read) diff --git a/testsuite/tests/rename/should_compile/T3262.hs b/testsuite/tests/rename/should_compile/T3262.hs new file mode 100644 index 0000000000..01437d8d2f --- /dev/null +++ b/testsuite/tests/rename/should_compile/T3262.hs @@ -0,0 +1,21 @@ +{-# OPTIONS -fwarn-name-shadowing #-} + +-- Trac #3262: report shadowing in g but not f + +module T3262 where + +f x = let _ignored = 10 in + let _ignored = 20 in + x + _ignored + +g x = let not_ignored = 10 in + let not_ignored = 20 in + x + not_ignored + +mf x = do let _ignored = 10 + let _ignored = 20 + return (x + _ignored) + +mg x = do let not_ignored = 10 + let not_ignored = 20 + return (x + not_ignored) diff --git a/testsuite/tests/rename/should_compile/T3262.stderr-ghc b/testsuite/tests/rename/should_compile/T3262.stderr-ghc new file mode 100644 index 0000000000..4e730efa8d --- /dev/null +++ b/testsuite/tests/rename/should_compile/T3262.stderr-ghc @@ -0,0 +1,8 @@ + +T3262.hs:12:11: + Warning: This binding for `not_ignored' shadows the existing binding + bound at T3262.hs:11:11 + +T3262.hs:20:15: + Warning: This binding for `not_ignored' shadows the existing binding + bound at T3262.hs:19:15 diff --git a/testsuite/tests/rename/should_compile/T3371.hs b/testsuite/tests/rename/should_compile/T3371.hs new file mode 100644 index 0000000000..9b3d4459f9 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T3371.hs @@ -0,0 +1,10 @@ +{-# LANGUAGE RecordWildCards #-} +{-# OPTIONS_GHC -fwarn-unused-matches #-} + +-- Should warn about the unused 'a', but not about the unused 'c' + +module T3371(bar) where + +data Foo = Foo { a,b,c :: Int } deriving(Eq) + +bar Foo{ a = a, ..} = print b diff --git a/testsuite/tests/rename/should_compile/T3371.stderr b/testsuite/tests/rename/should_compile/T3371.stderr new file mode 100644 index 0000000000..b354d9d3d6 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T3371.stderr @@ -0,0 +1,2 @@ + +T3371.hs:10:14: Warning: Defined but not used: `a' diff --git a/testsuite/tests/rename/should_compile/T3449.hs b/testsuite/tests/rename/should_compile/T3449.hs new file mode 100644 index 0000000000..462bde67af --- /dev/null +++ b/testsuite/tests/rename/should_compile/T3449.hs @@ -0,0 +1,13 @@ + +module T3449 (Foo, f1) where + +import T3449A + +class Foo a where + f1 :: a + f2 :: a + +instance Foo Char where + f1 = f2 + f2 = aChar + diff --git a/testsuite/tests/rename/should_compile/T3449.hs-boot b/testsuite/tests/rename/should_compile/T3449.hs-boot new file mode 100644 index 0000000000..153f29eef8 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T3449.hs-boot @@ -0,0 +1,9 @@ + +module T3449 (Foo, f1) where + +class Foo a where + f1 :: a + f2 :: a + +unused :: Int + diff --git a/testsuite/tests/rename/should_compile/T3449.stderr b/testsuite/tests/rename/should_compile/T3449.stderr new file mode 100644 index 0000000000..da36d24465 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T3449.stderr @@ -0,0 +1,2 @@ + +T3449.hs-boot:8:1: Warning: Defined but not used: `unused' diff --git a/testsuite/tests/rename/should_compile/T3449A.hs b/testsuite/tests/rename/should_compile/T3449A.hs new file mode 100644 index 0000000000..6af161cdfd --- /dev/null +++ b/testsuite/tests/rename/should_compile/T3449A.hs @@ -0,0 +1,10 @@ + +module T3449A where + +import {-# SOURCE #-} T3449 + +z :: Foo a => a +z = f1 + +aChar :: Char +aChar = 'a' diff --git a/testsuite/tests/rename/should_compile/T3640.hs b/testsuite/tests/rename/should_compile/T3640.hs new file mode 100644 index 0000000000..2f8c2253ab --- /dev/null +++ b/testsuite/tests/rename/should_compile/T3640.hs @@ -0,0 +1,11 @@ +{-# LANGUAGE NamedFieldPuns #-} + +module T3640 where + +data Record = Record { f1, f2, f3 :: Int } + +goodPun Record{f1,f2,f3} = f1 + f2 + f3 + +badPun r = f1 + f2 + f3 + where Record{f1=f1,f2,f3} = r + diff --git a/testsuite/tests/rename/should_compile/T3823.stderr b/testsuite/tests/rename/should_compile/T3823.stderr new file mode 100644 index 0000000000..0eb8234554 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T3823.stderr @@ -0,0 +1,6 @@ + +T3823B.hs:8:7: + Couldn't match expected type `A' with actual type `Bool' + In the first argument of `y', namely `a' + In the expression: y a + In an equation for `b': b = y a diff --git a/testsuite/tests/rename/should_compile/T3823A.hs b/testsuite/tests/rename/should_compile/T3823A.hs new file mode 100644 index 0000000000..0a5c230973 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T3823A.hs @@ -0,0 +1,8 @@ +module T3823A where + +import T3823B + +data A = X { x :: Bool } | Y + +y :: A -> A +y = \_ -> Y diff --git a/testsuite/tests/rename/should_compile/T3823A.hs-boot b/testsuite/tests/rename/should_compile/T3823A.hs-boot new file mode 100644 index 0000000000..3b7dd8bb17 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T3823A.hs-boot @@ -0,0 +1,5 @@ +module T3823A where + +data A = X { x :: Bool } | Y + +y :: A -> A diff --git a/testsuite/tests/rename/should_compile/T3823B.hs b/testsuite/tests/rename/should_compile/T3823B.hs new file mode 100644 index 0000000000..9f4d03e091 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T3823B.hs @@ -0,0 +1,8 @@ +module T3823B where + +import {-# SOURCE #-} T3823A + +data B = A A + +a = x (X True) +b = y a diff --git a/testsuite/tests/rename/should_compile/T3901.hs b/testsuite/tests/rename/should_compile/T3901.hs new file mode 100644 index 0000000000..39b521977b --- /dev/null +++ b/testsuite/tests/rename/should_compile/T3901.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE RecordWildCards, TransformListComp, NamedFieldPuns #-} + +module T3901 where + +data Rec = Rec {a :: Int} deriving (Show) + +recs1 = [a | Rec {a=a} <- [Rec 1], then group by a] + +recs2 = [a | Rec {a} <- [Rec 1], then group by a] + +recs3 = [a | Rec {..} <- [Rec 1], then group by a] + +recs4 :: [[Int]] +recs4 = [a | Rec {..} <- [Rec 1], then group by a] diff --git a/testsuite/tests/rename/should_compile/T3943.hs b/testsuite/tests/rename/should_compile/T3943.hs new file mode 100644 index 0000000000..efbeb295be --- /dev/null +++ b/testsuite/tests/rename/should_compile/T3943.hs @@ -0,0 +1,10 @@ +{-# OPTIONS_GHC -Wall #-}
+{-# LANGUAGE ViewPatterns #-}
+
+module T3943 where
+
+-- Note that 'r' is used, in the view pattern
+-- The bug was that 'r' was reported unused
+
+test :: ([a], [a]) -> [a]
+test x = let (r,(r++) -> rs) = x in rs
diff --git a/testsuite/tests/rename/should_compile/T4003A.hs b/testsuite/tests/rename/should_compile/T4003A.hs new file mode 100644 index 0000000000..c17fbae456 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T4003A.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE DeriveDataTypeable #-} + +module T4003A where + +import T4003B + +import Data.Data + +data MyId = MyId + deriving (Data, Typeable) + +data HsExpr id + = HsOverLit (HsOverLit id) + | HsBracketOut (HsExpr MyId) + deriving (Data, Typeable) diff --git a/testsuite/tests/rename/should_compile/T4003A.hs-boot b/testsuite/tests/rename/should_compile/T4003A.hs-boot new file mode 100644 index 0000000000..b750e47474 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T4003A.hs-boot @@ -0,0 +1,8 @@ +module T4003A where + +import Data.Data + +data HsExpr i + +instance Typeable1 HsExpr +instance Data i => Data (HsExpr i) diff --git a/testsuite/tests/rename/should_compile/T4003B.hs b/testsuite/tests/rename/should_compile/T4003B.hs new file mode 100644 index 0000000000..24ce2432a2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T4003B.hs @@ -0,0 +1,19 @@ + +{-# LANGUAGE DeriveDataTypeable #-} + +module T4003B where + +import {-# SOURCE #-} T4003A (HsExpr) + +import Data.Data + +data HsLit = HsChar + deriving (Data, Typeable) + +data HsOverLit id + = OverLit (HsExpr id) + deriving (Data, Typeable) + +data OverLitVal = HsIntegral + deriving (Data, Typeable) + diff --git a/testsuite/tests/rename/should_compile/T4239.hs b/testsuite/tests/rename/should_compile/T4239.hs new file mode 100644 index 0000000000..5d4f94f857 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T4239.hs @@ -0,0 +1,14 @@ + +module T4239 where + +import T4239A + +v1 :: (:+++) +v1 = (:+++) + +v2 :: (:+++) +v2 = X + +v3 :: (:+++) +v3 = (:---) + diff --git a/testsuite/tests/rename/should_compile/T4239A.hs b/testsuite/tests/rename/should_compile/T4239A.hs new file mode 100644 index 0000000000..ea92d9653b --- /dev/null +++ b/testsuite/tests/rename/should_compile/T4239A.hs @@ -0,0 +1,10 @@ + +{-# LANGUAGE TypeOperators #-} + +module T4239A where + +data (:+++) = (:+++) + | (:---) + | X + | Y + diff --git a/testsuite/tests/rename/should_compile/T4240.hs b/testsuite/tests/rename/should_compile/T4240.hs new file mode 100644 index 0000000000..75621cf4d5 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T4240.hs @@ -0,0 +1,8 @@ + +module T4240 where + +import T4240B + +v :: Int +v = m + diff --git a/testsuite/tests/rename/should_compile/T4240.stdout b/testsuite/tests/rename/should_compile/T4240.stdout new file mode 100644 index 0000000000..c73585f4a4 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T4240.stdout @@ -0,0 +1 @@ +import T4240B ( m ) diff --git a/testsuite/tests/rename/should_compile/T4240A.hs b/testsuite/tests/rename/should_compile/T4240A.hs new file mode 100644 index 0000000000..15215e7080 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T4240A.hs @@ -0,0 +1,9 @@ + +module T4240A where + +class C a where + m :: a + +instance C Int where + m = 5 + diff --git a/testsuite/tests/rename/should_compile/T4240B.hs b/testsuite/tests/rename/should_compile/T4240B.hs new file mode 100644 index 0000000000..b3165b3c12 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T4240B.hs @@ -0,0 +1,5 @@ + +module T4240B (m) where + +import T4240A + diff --git a/testsuite/tests/rename/should_compile/T4478.hs b/testsuite/tests/rename/should_compile/T4478.hs new file mode 100644 index 0000000000..0d6a5e1ea6 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T4478.hs @@ -0,0 +1,7 @@ + +-- We don't want to warn about duplicate exports for things exported +-- by both "module" exports +module T4478 (module Prelude, module Data.List) where + +import Prelude +import Data.List diff --git a/testsuite/tests/rename/should_compile/T4489.hs b/testsuite/tests/rename/should_compile/T4489.hs new file mode 100644 index 0000000000..a967cad06d --- /dev/null +++ b/testsuite/tests/rename/should_compile/T4489.hs @@ -0,0 +1,6 @@ +{-# OPTIONS_GHC -fwarn-missing-import-lists #-}
+module T4489 where
+
+import Data.Maybe
+import Data.Maybe( Maybe(..) )
+import Data.Maybe( Maybe(Just) )
diff --git a/testsuite/tests/rename/should_compile/T4489.stderr b/testsuite/tests/rename/should_compile/T4489.stderr new file mode 100644 index 0000000000..8cd400a720 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T4489.stderr @@ -0,0 +1,6 @@ +
+T4489.hs:4:1:
+ Warning: The module `Data.Maybe' does not have an explicit import list
+
+T4489.hs:5:1:
+ Warning: The import item `Maybe(..)' does not have an explicit import list
diff --git a/testsuite/tests/rename/should_compile/T4534.hs b/testsuite/tests/rename/should_compile/T4534.hs new file mode 100644 index 0000000000..03eb67f23d --- /dev/null +++ b/testsuite/tests/rename/should_compile/T4534.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE TransformListComp #-} + +-- GHC 7.0.1 failed because the renamer didn't attach +-- all the used variables to the TransformListComp constructor + +module List where + +intersectFront :: Ord a => [a] -> [a] -> [a] +intersectFront xs ys = [x | (x,y) <- zip xs ys, then takeWhile by x == y] diff --git a/testsuite/tests/rename/should_compile/T5331.hs b/testsuite/tests/rename/should_compile/T5331.hs new file mode 100644 index 0000000000..4e7343e56b --- /dev/null +++ b/testsuite/tests/rename/should_compile/T5331.hs @@ -0,0 +1,19 @@ +{-# LANGUAGE GADTs, ScopedTypeVariables #-} +{-# OPTIONS_GHC -Wall #-} + +module Foo where + +data T a + +instance Eq (T a) +{-# SPECIALISE instance forall a.Eq (T Int) #-} + +data S = forall a.S1 + +data W where + W1 :: forall a. W + +f :: forall a. Int +f = 3 + + diff --git a/testsuite/tests/rename/should_compile/T5331.stderr b/testsuite/tests/rename/should_compile/T5331.stderr new file mode 100644 index 0000000000..36261c539d --- /dev/null +++ b/testsuite/tests/rename/should_compile/T5331.stderr @@ -0,0 +1,18 @@ + +T5331.hs:9:32: + Warning: Unused quantified type variable `a' + In the type `forall a. Eq (T Int)' + In a SPECIALISE instance pragma + +T5331.hs:11:17: + Warning: Unused quantified type variable `a' + In the definition of data constructor `S1' + +T5331.hs:14:16: + Warning: Unused quantified type variable `a' + In the definition of data constructor `W1' + +T5331.hs:16:13: + Warning: Unused quantified type variable `a' + In the type `forall a. Int' + In the type signature for `f' diff --git a/testsuite/tests/rename/should_compile/T5334.hs b/testsuite/tests/rename/should_compile/T5334.hs new file mode 100644 index 0000000000..83f539d492 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T5334.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE RecordWildCards #-} + +module T5334 where + +data T = T { a, b :: Int } + +t = T {..} + where + a = 1 + -- b = 2 + +data S = S { x, y :: Int } + +s = S { x = 1 } diff --git a/testsuite/tests/rename/should_compile/T5334.stderr b/testsuite/tests/rename/should_compile/T5334.stderr new file mode 100644 index 0000000000..de906b9dd6 --- /dev/null +++ b/testsuite/tests/rename/should_compile/T5334.stderr @@ -0,0 +1,13 @@ + +T5334.hs:7:5: + Warning: Fields of `T' not initialised: b + In the expression: T {..} + In an equation for `t': + t = T {..} + where + a = 1 + +T5334.hs:14:5: + Warning: Fields of `S' not initialised: y + In the expression: S {x = 1} + In an equation for `s': s = S {x = 1} diff --git a/testsuite/tests/rename/should_compile/all.T b/testsuite/tests/rename/should_compile/all.T new file mode 100644 index 0000000000..3946987e37 --- /dev/null +++ b/testsuite/tests/rename/should_compile/all.T @@ -0,0 +1,179 @@ +# Args to vtc are: extra compile flags + +test('rn003', normal, compile, ['']) +test('rn005', normal, compile, ['']) +test('rn006', normal, compile, ['']) +test('rn009', + [only_compiler_types(['ghc']), + extra_clean(['Imp10Aux.hi', 'Imp10Aux.o', + 'Imp10Aux.hi-boot', 'Imp10Aux.o-boot'])], + multimod_compile, + ['rn009', '-v0']) +# rn10 tests the same things as 009,011,012 +#test('rn010', only_compiler_types(['ghc']), multimod_compile, ['rn010', '-v0']) +test('rn011', + [only_compiler_types(['ghc']), + extra_clean(['Imp100Aux.hi', 'Imp100Aux.o', + 'Imp100Aux.hi-boot', 'Imp100Aux.o-boot'])], + multimod_compile, + ['rn011', '-v0']) +test('rn012', + [only_compiler_types(['ghc']), + extra_clean(['Imp500Aux.hi', 'Imp500Aux.o', + 'Imp500Aux.hi-boot', 'Imp500Aux.o-boot'])], + multimod_compile, + ['rn012', '-v0']) +test('rn013', normal, compile, ['']) +test('rn017', + [only_compiler_types(['ghc']), + extra_clean(['RnAux017.hi', 'RnAux017.o', + 'RnAux017.hi-boot', 'RnAux017.o-boot'])], + multimod_compile, + ['rn017', '-v0']) +test('rn019', normal, compile, ['']) +test('rn020', normal, compile, ['']) +test('rn022', normal, compile, ['']) +test('rn023', normal, compile, ['']) +test('rn024', normal, compile, ['']) +test('rn025', normal, compile, ['']) +test('rn026', normal, compile, ['']) +test('rn027', normal, compile, ['']) +test('rn028', normal, compile, ['']) +test('rn029', normal, compile, ['']) +test('rn031', normal, compile, ['']) +test('rn032', normal, compile, ['']) +test('rn033', normal, compile, ['']) +test('rn034', normal, compile, ['']) +test('rn035', normal, compile, ['']) +test('rn036', normal, compile, ['']) +test('rn037', normal, compile, ['']) + +# Missing: +# test('rn038', normal, compile, ['']) + +test('rn039', normal, compile, ['']) +test('rn040', normal, compile, ['-fwarn-unused-binds -fwarn-unused-matches']) +test('rn041', normal, compile, ['']) +test('rn042', + extra_clean(['Rn042_A.hi', 'Rn042_A.o']), + multimod_compile, + ['rn042', '-v0']) +test('rn043', + extra_clean(['Rn043_A.hi', 'Rn043_A.o', 'Rn043_B.hi', 'Rn043_B.o']), + multimod_compile, ['rn043', '-v0']) +test('rn044', + extra_clean(['Rn044_A.hi', 'Rn044_A.o', 'Rn044_B.hi', 'Rn044_B.o']), + multimod_compile, ['rn044', '-v0']) +test('rn045', normal, compile, ['']) +test('rn046', normal, compile, ['-W']) +test('rn047', normal, compile, ['-W']) +test('rn048', normal, compile, ['-W']) +test('rn049', normal, compile, ['-W']) + +test('rn050', + extra_clean(['Rn050_A.hi', 'Rn050_A.o']), + multimod_compile, ['rn050', '-v0']) + +test('rn051', normal, compile, ['']) + +test('rn052', + extra_clean(['Rn052Aux.hi', 'Rn052Aux.o']), + multimod_compile, ['rn052', '-v0']) + +test('rn053', + extra_clean(['Rn053_A.hi', 'Rn053_A.o', 'Rn053_B.hi', 'Rn053_B.o']), + multimod_compile, ['rn053', '-v0']) + +test('rn054', normal, compile, ['']) +test('rn055', normal, compile, ['']) +test('rn056', normal, compile, ['']) +test('rn057', normal, compile, ['']) +test('rn058', normal, compile, ['']) +test('rn059', + extra_clean(['Rn059_A.hi', 'Rn059_A.o', 'Rn059_B.hi', 'Rn059_B.o']), + multimod_compile, ['rn059', '-v0']) +test('rn060', normal, compile, ['']) +test('rn061', normal, compile, ['']) +test('rn062', normal, compile, ['']) +test('rn063', normal, compile, ['']) +test('rn064', normal, compile, ['']) +test('rn065', + extra_clean(['Rn065A.hi', 'Rn065A.o']), + multimod_compile, + ['rn065', '-v0']) + +test('rn066', + extra_clean(['Rn066_A.hi', 'Rn066_A.o']), + multimod_compile, ['rn066', '-v0']) + +test('rn067', + extra_clean(['Rn067_A.hi', 'Rn067_A.o']), + multimod_compile, ['rn067', '-v0']) + +test('T1972', normal, compile, ['']) +test('T2205', normal, compile, ['']) + +test('2334', normal, compile, ['']) +test('T2506', normal, compile, ['']) +test('T2914', normal, compile, ['']) +test('T3221', normal, compile, ['']) +test('T3262', normal, compile, ['']) +test('T3371', normal, compile, ['']) +test('T1074b', normal, compile, ['-Wall']) +test('T3640', normal, compile, ['']) +test('T3901', normal, compile, ['']) +test('T1954', normal, compile, ['']) +test('T3943', normal, compile, ['']) + +test('timing001', normal, compile, ['']) +test('timing002', normal, compile, ['']) +test('timing003', normal, compile, ['']) + +test('T1792_imports', extra_clean(['T1792_imports.imports']), run_command, + ['$MAKE -s --no-print-directory T1792_imports']) + +test('T3823', + extra_clean(['T3823A.hi-boot', 'T3823A.hi', 'T3823B.hi', + 'T3823A.o-boot', 'T3823A.o', 'T3823B.o']), + run_command, + ['$MAKE -s --no-print-directory T3823']) + +test('T4003', + extra_clean(['T4003A.hi-boot', 'T4003A.hi', 'T4003B.hi', + 'T4003A.o-boot', 'T4003A.o', 'T4003B.o']), + run_command, + ['$MAKE -s --no-print-directory T4003']) +test('T1789', normal, compile, ['']) +test('T1789_2', normal, compile, ['']) +test('T3449', + extra_clean(['T3449.hi-boot', 'T3449.hi', + 'T3449.o-boot', 'T3449.o']), + run_command, + ['$MAKE -s --no-print-directory T3449']) +test('T4239', + [expect_broken(4239), + extra_clean(['T4239A.hi', 'T4239A.o', 'T4239.hi', 'T4239.o', + 'T4239.imports'])], + run_command, + ['$MAKE -s --no-print-directory T4239']) +test('T4240', + [extra_clean(['T4240A.hi', 'T4240A.o', 'T4240.hi', 'T4240.o', + 'T4240.imports'])], + run_command, + ['$MAKE -s --no-print-directory T4240']) + +test('T4489', normal, compile, ['']) +test('T4478', if_compiler_lt('ghc', '7.1', expect_fail), compile, ['']) +test('T4534', normal, compile, ['']) + +test('mc09', normal, compile, ['']) +test('mc10', normal, compile, ['']) +test('mc11', normal, compile, ['']) +test('mc12', normal, compile, ['']) +test('T2436', + [ only_compiler_types(['ghc']), + extra_clean(['T2436a.hi', 'T2436a.o']) ], + multimod_compile, + ['T2436', '-v0']) +test('T5331', normal, compile, ['']) # Unused tyvar warnings +test('T5334', normal, compile, ['']) # Unused tyvar warnings diff --git a/testsuite/tests/rename/should_compile/mc09.hs b/testsuite/tests/rename/should_compile/mc09.hs new file mode 100644 index 0000000000..f4a62fa617 --- /dev/null +++ b/testsuite/tests/rename/should_compile/mc09.hs @@ -0,0 +1,10 @@ +{-# LANGUAGE MonadComprehensions, TransformListComp #-} + +-- Test performed for TransformListComp and should work for monad comp aswell: +-- GHC 7.0.1 failed because the renamer didn't attach +-- all the used variables to the TransformListComp constructor + +module List where + +intersectFront :: Ord a => [a] -> [a] -> [a] +intersectFront xs ys = [x | (x,y) <- zip xs ys, then takeWhile by x == y] diff --git a/testsuite/tests/rename/should_compile/mc10.hs b/testsuite/tests/rename/should_compile/mc10.hs new file mode 100644 index 0000000000..fa9774fdfb --- /dev/null +++ b/testsuite/tests/rename/should_compile/mc10.hs @@ -0,0 +1,15 @@ +{-# OPTIONS_GHC -fwarn-unused-matches #-} +{-# LANGUAGE MonadComprehensions, ParallelListComp #-} +-- Test for parallel list comp should work for monad comp aswell: +-- +-- GHC 6.4 erroneously reported that the +-- bindings for q and z were unused +-- +-- Note the parallel list comprehension, +-- which was the cause of the trouble + +module ShouldCompile where + +t :: [Int] +t = [ q | y <- [1..10] + | z <- [30..40], let q = z*z] diff --git a/testsuite/tests/rename/should_compile/mc10.stderr-ghc b/testsuite/tests/rename/should_compile/mc10.stderr-ghc new file mode 100644 index 0000000000..585bfa4528 --- /dev/null +++ b/testsuite/tests/rename/should_compile/mc10.stderr-ghc @@ -0,0 +1,2 @@ + +mc10.hs:14:11: Warning: Defined but not used: `y' diff --git a/testsuite/tests/rename/should_compile/mc11.hs b/testsuite/tests/rename/should_compile/mc11.hs new file mode 100644 index 0000000000..250e587a16 --- /dev/null +++ b/testsuite/tests/rename/should_compile/mc11.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE RecordWildCards, MonadComprehensions, TransformListComp, NamedFieldPuns #-} + +module T3901 where + +data Rec = Rec {a :: Int} deriving (Show) + +recs1 = [a | Rec {a=a} <- [Rec 1], then group by a] + +recs2 = [a | Rec {a} <- [Rec 1], then group by a] + +recs3 = [a | Rec {..} <- [Rec 1], then group by a] + +recs4 :: [[Int]] +recs4 = [a | Rec {..} <- [Rec 1], then group by a] diff --git a/testsuite/tests/rename/should_compile/mc12.hs b/testsuite/tests/rename/should_compile/mc12.hs new file mode 100644 index 0000000000..cd55dfb451 --- /dev/null +++ b/testsuite/tests/rename/should_compile/mc12.hs @@ -0,0 +1,11 @@ +{-# OPTIONS_GHC -Wall #-} +{-# LANGUAGE MonadComprehensions, ParallelListComp #-} +-- Test for parallel list comp, which should work for monad comp as well: +-- +-- On GHC 6.0 and earlier, this parallel list comprehension generated +-- an incorrect unused-binding warning. + +module ShouldCompile where + +t :: [(Char,Char)] +t = [ (a,b) | a <- "foo" | b <- "bar" ] diff --git a/testsuite/tests/rename/should_compile/rn003.hs b/testsuite/tests/rename/should_compile/rn003.hs new file mode 100644 index 0000000000..bb22583721 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn003.hs @@ -0,0 +1,9 @@ +module Foo (f) where +-- export food +f x = x + +-- !!! weird patterns with no variables +1 = f 1 +[] = f [] +1 = f (f 1) +[] = f (f []) diff --git a/testsuite/tests/rename/should_compile/rn003.stderr b/testsuite/tests/rename/should_compile/rn003.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn003.stderr diff --git a/testsuite/tests/rename/should_compile/rn005.hs b/testsuite/tests/rename/should_compile/rn005.hs new file mode 100644 index 0000000000..623bd78df3 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn005.hs @@ -0,0 +1,8 @@ +-- !!! rn005: simplest case: a few non-recursive bindings + +module Test where + +f = [] +g x = x +h x y = x +i x y z = x diff --git a/testsuite/tests/rename/should_compile/rn005.stderr b/testsuite/tests/rename/should_compile/rn005.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn005.stderr diff --git a/testsuite/tests/rename/should_compile/rn006.hs b/testsuite/tests/rename/should_compile/rn006.hs new file mode 100644 index 0000000000..4f4c0a4fed --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn006.hs @@ -0,0 +1,14 @@ +-- !!! rn006: two sets of mutually-recursive blobs: +-- !!! f, g, h are mut rec +-- !!! i, j, k are mut rec + +module Test where + +f x = g x x +i x = j x x + +g x y = h x x y +j x y = k x x y + +h x y z = f z +k x y z = i z diff --git a/testsuite/tests/rename/should_compile/rn006.stderr b/testsuite/tests/rename/should_compile/rn006.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn006.stderr diff --git a/testsuite/tests/rename/should_compile/rn009.hs b/testsuite/tests/rename/should_compile/rn009.hs new file mode 100644 index 0000000000..7192e1d45a --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn009.hs @@ -0,0 +1,2 @@ +module Imp10 where +import {-# SOURCE #-} Imp10Aux diff --git a/testsuite/tests/rename/should_compile/rn009.stderr b/testsuite/tests/rename/should_compile/rn009.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn009.stderr diff --git a/testsuite/tests/rename/should_compile/rn010.hs b/testsuite/tests/rename/should_compile/rn010.hs new file mode 100644 index 0000000000..d1eac0a700 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn010.hs @@ -0,0 +1,12 @@ +module Imp100 where +import {-# SOURCE #-} Int10 +import {-# SOURCE #-} Int10 +import {-# SOURCE #-} Int10 +import {-# SOURCE #-} Int10 +import {-# SOURCE #-} Int10 +import {-# SOURCE #-} Int10 +import {-# SOURCE #-} Int10 +import {-# SOURCE #-} Int10 +import {-# SOURCE #-} Int10 +import {-# SOURCE #-} Int10 + diff --git a/testsuite/tests/rename/should_compile/rn010.stderr b/testsuite/tests/rename/should_compile/rn010.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn010.stderr diff --git a/testsuite/tests/rename/should_compile/rn011.hs b/testsuite/tests/rename/should_compile/rn011.hs new file mode 100644 index 0000000000..df0cb62b25 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn011.hs @@ -0,0 +1,101 @@ +module Imp100 where +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux +import {-# SOURCE #-} Imp100Aux + diff --git a/testsuite/tests/rename/should_compile/rn011.stderr b/testsuite/tests/rename/should_compile/rn011.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn011.stderr diff --git a/testsuite/tests/rename/should_compile/rn012.hs b/testsuite/tests/rename/should_compile/rn012.hs new file mode 100644 index 0000000000..46bcfce6a3 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn012.hs @@ -0,0 +1,503 @@ +module Imp500 where +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux +import {-# SOURCE #-} Imp500Aux + + diff --git a/testsuite/tests/rename/should_compile/rn012.stderr b/testsuite/tests/rename/should_compile/rn012.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn012.stderr diff --git a/testsuite/tests/rename/should_compile/rn013.hs b/testsuite/tests/rename/should_compile/rn013.hs new file mode 100644 index 0000000000..e48c2c56ee --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn013.hs @@ -0,0 +1,21 @@ +module Mod10 where + +data T1 a = C1 a + +data T2 a b = T2C1 a | T2C2 b + +data T3 a b c = T3C1 a | T3C2 b | T3C3 c + +data T4 a b c d = T4C1 a | T4C2 b | T4C3 c | T4C4 d + +data T5 a b c d e = T5C1 a | T5C2 b | T5C3 c | T5C4 d | T5C5 e + +data T6 a = T6C6 a + +data T7 a b = T7C6 a | T7C7 b + +data T8 a b c = T8C1 a | T8C2 b | T8C3 c + +data T9 a b c d = T9C1 a | T9C2 b | T9C3 c | T9C4 d + +data T10 a b c d e = T10C1 a | T10C2 b | T10C3 c | T10C4 d | T10C5 e diff --git a/testsuite/tests/rename/should_compile/rn013.stderr b/testsuite/tests/rename/should_compile/rn013.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn013.stderr diff --git a/testsuite/tests/rename/should_compile/rn016.stderr b/testsuite/tests/rename/should_compile/rn016.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn016.stderr diff --git a/testsuite/tests/rename/should_compile/rn017.hs b/testsuite/tests/rename/should_compile/rn017.hs new file mode 100644 index 0000000000..7d073e90ea --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn017.hs @@ -0,0 +1,14 @@ +-- !! Rexporting +module Test ( module Test , module RnAux017 ) where + +import {-# SOURCE #-} RnAux017 + +f x = x + +data Foo = MkFoo + +class FOO a where + op :: a -> Int + +instance FOO Foo where + op x = 42 diff --git a/testsuite/tests/rename/should_compile/rn018.stderr b/testsuite/tests/rename/should_compile/rn018.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn018.stderr diff --git a/testsuite/tests/rename/should_compile/rn019.hs b/testsuite/tests/rename/should_compile/rn019.hs new file mode 100644 index 0000000000..9c393f9119 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn019.hs @@ -0,0 +1,4 @@ +module Silly ( + Data.Array.accum + ) where +import qualified Data.Array diff --git a/testsuite/tests/rename/should_compile/rn020.hs b/testsuite/tests/rename/should_compile/rn020.hs new file mode 100644 index 0000000000..5485d7cb51 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn020.hs @@ -0,0 +1,11 @@ +-- !!! Duplicate fields in record decls + +module OK where + +data X = A {a :: Int} | B {a :: Int} + +f x = x + +-- data Y = V {a :: Int} + +-- f y = y diff --git a/testsuite/tests/rename/should_compile/rn022.hs b/testsuite/tests/rename/should_compile/rn022.hs new file mode 100644 index 0000000000..c59b949a48 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn022.hs @@ -0,0 +1,11 @@ +-- this is legal, I think (WDP) + +module Confused where + +import Prelude hiding (otherwise) + +otherwise = False + +f x | otherwise = 1 + +g otherwise | otherwise = 2 diff --git a/testsuite/tests/rename/should_compile/rn022.stderr b/testsuite/tests/rename/should_compile/rn022.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn022.stderr diff --git a/testsuite/tests/rename/should_compile/rn023.hs b/testsuite/tests/rename/should_compile/rn023.hs new file mode 100644 index 0000000000..3522ff0ff4 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn023.hs @@ -0,0 +1,3 @@ +-- !! This one is fine in Haskell 1.4 +-- +module Foo ( Bar(..) ) where { data Bar = Bar X; data X = Y } diff --git a/testsuite/tests/rename/should_compile/rn024.hs b/testsuite/tests/rename/should_compile/rn024.hs new file mode 100644 index 0000000000..ae9cc6b4f0 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn024.hs @@ -0,0 +1,9 @@ +-- !! This is fine in Haskell 1.4 +-- +module Foo ( Baz(..) ) where + +class Baz a where + opx :: Int -> Bar -> a -> a + +data Bar = Bar X +data X = Y diff --git a/testsuite/tests/rename/should_compile/rn025.hs b/testsuite/tests/rename/should_compile/rn025.hs new file mode 100644 index 0000000000..b8bf1ffe94 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn025.hs @@ -0,0 +1,5 @@ +-- !!! Re-exporting a module whose contents is partially hidden. +module ShouldCompile ( module Data.List ) where + +import Data.List hiding ( sort ) + diff --git a/testsuite/tests/rename/should_compile/rn025.stderr b/testsuite/tests/rename/should_compile/rn025.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn025.stderr diff --git a/testsuite/tests/rename/should_compile/rn026.hs b/testsuite/tests/rename/should_compile/rn026.hs new file mode 100644 index 0000000000..45510361a9 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn026.hs @@ -0,0 +1,12 @@ +-- !!! Checking that more than imported module can share a local +-- !!! local alias. +module ShouldCompile where + +import qualified Data.List as X +import qualified Data.Maybe as X + +x :: Ord a => [a] -> [a] +x = X.sort + +y :: Maybe a -> Bool +y = X.isJust diff --git a/testsuite/tests/rename/should_compile/rn027.hs b/testsuite/tests/rename/should_compile/rn027.hs new file mode 100644 index 0000000000..76cefe9310 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn027.hs @@ -0,0 +1,12 @@ +-- !!! Checking that an imported module may still have +-- !!! a local alias without having used 'qualified'. +module ShouldCompile where + +import Data.List as X +import Data.Maybe as X + +x :: Ord a => [a] -> [a] +x = X.sort + +y :: Maybe a -> Bool +y = X.isJust diff --git a/testsuite/tests/rename/should_compile/rn028.hs b/testsuite/tests/rename/should_compile/rn028.hs new file mode 100644 index 0000000000..6bbafd7a36 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn028.hs @@ -0,0 +1,18 @@ +-- !!! Checking that a toplevel declaration 'f' in module M is accessible +-- !!! as both 'f' and 'M.f' within the scope of M. Similarly for imported +-- !!! entities. +module ShouldCompile where + +import Data.List ( sort ) + +x :: Int +x = 2 + +y :: Int +y = x + +z :: Int +z = ShouldCompile.x + +sortOf :: Ord a=> [a] -> [a] +sortOf = Data.List.sort diff --git a/testsuite/tests/rename/should_compile/rn029.hs b/testsuite/tests/rename/should_compile/rn029.hs new file mode 100644 index 0000000000..76dd993dc9 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn029.hs @@ -0,0 +1,17 @@ +-- !!! Checking that lazy name clashing works. +module ShouldCompile where + +import Data.List ( reverse, sort ) + +sort :: Int -- Clashes with Data.List.sort, +sort = 4 -- but never used, so OK + + +reverse :: Int -- Clashes with Data.List.reverse, +reverse = 3 -- but the only uses are qualified + +x = ShouldCompile.reverse + +y = Data.List.reverse + + diff --git a/testsuite/tests/rename/should_compile/rn031.hs b/testsuite/tests/rename/should_compile/rn031.hs new file mode 100644 index 0000000000..7b4a07d626 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn031.hs @@ -0,0 +1,12 @@ +-- !!! Checking that an imported module may still have +-- !!! a local alias without having used 'qualified'. +module ShouldCompile where + +import Data.List as X +import Data.Maybe as X + +x :: Ord a => [a] -> [a] +x = X.sort + +y :: Maybe a -> Bool +y = isJust diff --git a/testsuite/tests/rename/should_compile/rn032.hs b/testsuite/tests/rename/should_compile/rn032.hs new file mode 100644 index 0000000000..6bbafd7a36 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn032.hs @@ -0,0 +1,18 @@ +-- !!! Checking that a toplevel declaration 'f' in module M is accessible +-- !!! as both 'f' and 'M.f' within the scope of M. Similarly for imported +-- !!! entities. +module ShouldCompile where + +import Data.List ( sort ) + +x :: Int +x = 2 + +y :: Int +y = x + +z :: Int +z = ShouldCompile.x + +sortOf :: Ord a=> [a] -> [a] +sortOf = Data.List.sort diff --git a/testsuite/tests/rename/should_compile/rn033.hs b/testsuite/tests/rename/should_compile/rn033.hs new file mode 100644 index 0000000000..4c30160a8d --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn033.hs @@ -0,0 +1,14 @@ +-- !!! Checking that lazy name clashing works +module ShouldCompile where + +import Data.List ( sort ) + +sort :: Int +sort = 3 + +foo :: Int +foo = ShouldCompile.sort + +baz :: (Ord a) => [a] -> [a] +baz = Data.List.sort + diff --git a/testsuite/tests/rename/should_compile/rn034.hs b/testsuite/tests/rename/should_compile/rn034.hs new file mode 100644 index 0000000000..b8fc047171 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn034.hs @@ -0,0 +1,12 @@ +-- !!! Checking that empty declarations are permitted. +module ShouldCompile where + + +class Foo a where + +class Foz a + +x = 2 where +y = 3 + +instance Foo Int where diff --git a/testsuite/tests/rename/should_compile/rn035.hs b/testsuite/tests/rename/should_compile/rn035.hs new file mode 100644 index 0000000000..3de6a9b71d --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn035.hs @@ -0,0 +1,10 @@ +-- !!! Checking what's legal in the body of a class declaration. +module ShouldCompile where + +class Foo a where { + (--<>--) :: a -> a -> Int ; + infixl 5 --<>-- ; + (--<>--) _ _ = 2 ; -- empty decl at the end. +}; + + diff --git a/testsuite/tests/rename/should_compile/rn036.hs b/testsuite/tests/rename/should_compile/rn036.hs new file mode 100644 index 0000000000..9eb96b1dd6 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn036.hs @@ -0,0 +1,14 @@ +-- !!! Checking that qualified method names are legal in instance body. +-- but not (now -- Aug 02) in the binding position +module ShouldCompile where + +import Prelude hiding (Eq, (==)) +import Prelude as P (Eq,(==)) + +data Foo = Foo Int Integer + +instance P.Eq Foo where + (Foo a1 b1) == (Foo a2 b2) = a1 P.== a2 && b1 P.== b2 + + + diff --git a/testsuite/tests/rename/should_compile/rn037.hs b/testsuite/tests/rename/should_compile/rn037.hs new file mode 100644 index 0000000000..46de96fae5 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn037.hs @@ -0,0 +1,4 @@ +{-# OPTIONS -fwarn-unused-imports #-} +-- !!! test unused import warning +import Data.List +main = return () :: IO () diff --git a/testsuite/tests/rename/should_compile/rn037.stderr-ghc b/testsuite/tests/rename/should_compile/rn037.stderr-ghc new file mode 100644 index 0000000000..64b604f9bd --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn037.stderr-ghc @@ -0,0 +1,5 @@ + +rn037.hs:3:1: + Warning: The import of `Data.List' is redundant + except perhaps to import instances from `Data.List' + To import instances alone, use: import Data.List() diff --git a/testsuite/tests/rename/should_compile/rn039.hs b/testsuite/tests/rename/should_compile/rn039.hs new file mode 100644 index 0000000000..9033858158 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn039.hs @@ -0,0 +1,6 @@ +{-# OPTIONS -fwarn-name-shadowing #-} +module ShouldCompile where + +-- !!! test shadowing of a global name + +g = 42 where f -1 = -1 -- shadows (-), probably by accident! diff --git a/testsuite/tests/rename/should_compile/rn039.stderr-ghc b/testsuite/tests/rename/should_compile/rn039.stderr-ghc new file mode 100644 index 0000000000..f3c9c5bf3d --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn039.stderr-ghc @@ -0,0 +1,4 @@ + +rn039.hs:6:16: + Warning: This binding for `-' shadows the existing binding + imported from Prelude diff --git a/testsuite/tests/rename/should_compile/rn040.hs b/testsuite/tests/rename/should_compile/rn040.hs new file mode 100644 index 0000000000..3b418f5c2f --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn040.hs @@ -0,0 +1,8 @@ +{-# OPTIONS -fwarn-unused-binds #-}
+module ShouldCompile where
+
+-- !!! should produce warnings about unused identifers
+x :: [()]
+x = [ () | y <- [] ]
+
+z = do w <- getContents; return ()
diff --git a/testsuite/tests/rename/should_compile/rn040.stderr-ghc b/testsuite/tests/rename/should_compile/rn040.stderr-ghc new file mode 100644 index 0000000000..5de9d0c1c6 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn040.stderr-ghc @@ -0,0 +1,4 @@ + +rn040.hs:6:12: Warning: Defined but not used: `y' + +rn040.hs:8:8: Warning: Defined but not used: `w' diff --git a/testsuite/tests/rename/should_compile/rn041.hs b/testsuite/tests/rename/should_compile/rn041.hs new file mode 100644 index 0000000000..454227c14d --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn041.hs @@ -0,0 +1,13 @@ +{-# OPTIONS -fwarn-unused-binds #-} + +-- Test reports of unused bindings + +module ShouldCompile( t ) where + +f x = f x -- Unused + +g x = h x -- Unused +h x = g x + +t x = t x -- Used by export list + diff --git a/testsuite/tests/rename/should_compile/rn041.stderr-ghc b/testsuite/tests/rename/should_compile/rn041.stderr-ghc new file mode 100644 index 0000000000..da94a09854 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn041.stderr-ghc @@ -0,0 +1,6 @@ + +rn041.hs:7:1: Warning: Defined but not used: `f' + +rn041.hs:9:1: Warning: Defined but not used: `g' + +rn041.hs:10:1: Warning: Defined but not used: `h' diff --git a/testsuite/tests/rename/should_compile/rn042.hs b/testsuite/tests/rename/should_compile/rn042.hs new file mode 100644 index 0000000000..db96e89b73 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn042.hs @@ -0,0 +1,5 @@ +-- Record field selectors imported alone; should be ok + +module M where + +import Rn042_A( field ) diff --git a/testsuite/tests/rename/should_compile/rn043.hs b/testsuite/tests/rename/should_compile/rn043.hs new file mode 100644 index 0000000000..e88e8426df --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn043.hs @@ -0,0 +1,6 @@ +-- This one should succeed; M.x is unambiguous + +module ShouldCompile (module M) where + + import Rn043_A as M -- x, M.x + import Rn043_B -- x, Rn043_A.x diff --git a/testsuite/tests/rename/should_compile/rn044.hs b/testsuite/tests/rename/should_compile/rn044.hs new file mode 100644 index 0000000000..44e33b40b4 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn044.hs @@ -0,0 +1,8 @@ +-- This one should succeed; x is unambiguous, even +-- though M.x is not + +module ShouldCompile (module M) where + +import qualified Rn044_A as M -- M.x +import Rn044_B as M -- x, M.x + diff --git a/testsuite/tests/rename/should_compile/rn045.hs b/testsuite/tests/rename/should_compile/rn045.hs new file mode 100644 index 0000000000..16a3c49972 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn045.hs @@ -0,0 +1,9 @@ +{-# OPTIONS_GHC -Wall #-} +{-# LANGUAGE ParallelListComp #-} +-- On GHC 6.0 and earlier, this parallel list comprehension generated +-- an incorrect unused-binding warning. + +module ShouldCompile where + +t :: [(Char,Char)] +t = [ (a,b) | a <- "foo" | b <- "bar" ] diff --git a/testsuite/tests/rename/should_compile/rn046.hs b/testsuite/tests/rename/should_compile/rn046.hs new file mode 100644 index 0000000000..ba469f3aec --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn046.hs @@ -0,0 +1,6 @@ +module ShouldCompile where +import Data.List (nub) -- all unused +import Data.Char (ord, chr) -- some unused + +x = chr 42 + diff --git a/testsuite/tests/rename/should_compile/rn046.stderr-ghc b/testsuite/tests/rename/should_compile/rn046.stderr-ghc new file mode 100644 index 0000000000..ebde8af373 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn046.stderr-ghc @@ -0,0 +1,8 @@ + +rn046.hs:2:1: + Warning: The import of `Data.List' is redundant + except perhaps to import instances from `Data.List' + To import instances alone, use: import Data.List() + +rn046.hs:3:1: + Warning: The import of `ord' from module `Data.Char' is redundant diff --git a/testsuite/tests/rename/should_compile/rn047.hs b/testsuite/tests/rename/should_compile/rn047.hs new file mode 100644 index 0000000000..f4526aa384 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn047.hs @@ -0,0 +1,13 @@ +{-# OPTIONS_GHC -fwarn-unused-matches #-} +{-# LANGUAGE ParallelListComp #-} +-- GHC 6.4 erroneously reported that the +-- bindings for q and z were unused +-- +-- Note the parallel list comprehension, +-- which was the cause of the trouble + +module ShouldCompile where + +t :: [Int] +t = [ q | y <- [1..10] + | z <- [30..40], let q = z*z] diff --git a/testsuite/tests/rename/should_compile/rn047.stderr-ghc b/testsuite/tests/rename/should_compile/rn047.stderr-ghc new file mode 100644 index 0000000000..8b9614cb17 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn047.stderr-ghc @@ -0,0 +1,2 @@ + +rn047.hs:12:11: Warning: Defined but not used: `y' diff --git a/testsuite/tests/rename/should_compile/rn048.hs b/testsuite/tests/rename/should_compile/rn048.hs new file mode 100644 index 0000000000..e34c979258 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn048.hs @@ -0,0 +1,15 @@ +{-# LANGUAGE GADTs #-} +{-# OPTIONS_GHC -W #-} +-- Produced a bogus unused-import warning in versions of GHC 6.6 + +module Bug ( Structure (..) ) where + +import Prelude hiding( Rational ) + -- Rational is exported by Prelude +import Data.Ratio ( Rational ) + +data Structure a where + StructCons :: Int -> Structure Int + StructRatio :: Structure Rational + + diff --git a/testsuite/tests/rename/should_compile/rn049.hs b/testsuite/tests/rename/should_compile/rn049.hs new file mode 100644 index 0000000000..83f6c5c276 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn049.hs @@ -0,0 +1,13 @@ +-- GHC 6.4.1 said +-- test.hs:1:5: +-- Warning: accepting non-standard pattern guards +-- (-fglasgow-exts to suppress this message) +-- [x <- ((1 * 2) + 3) * 4, undefined] +-- Note the wrongly-parenthesised expression + +{-# LANGUAGE Haskell98 #-} + +module ShouldCompile where + +main | x <- 1*2+3*4 = x +
\ No newline at end of file diff --git a/testsuite/tests/rename/should_compile/rn049.stderr b/testsuite/tests/rename/should_compile/rn049.stderr new file mode 100644 index 0000000000..766c681051 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn049.stderr @@ -0,0 +1,4 @@ + +rn049.hs:12:6: + Warning: accepting non-standard pattern guards (use -XPatternGuards to suppress this message) + x <- 1 * 2 + 3 * 4 diff --git a/testsuite/tests/rename/should_compile/rn050.hs b/testsuite/tests/rename/should_compile/rn050.hs new file mode 100644 index 0000000000..4dd1e6c4c4 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn050.hs @@ -0,0 +1,13 @@ +{-# OPTIONS_GHC -fwarn-warnings-deprecations #-} + +-- Test deprecation of constructors and class ops + +module ShouldCompile where + +import Rn050_A + +instance Foo T where + op x = x + bop y = y + +foo = op C diff --git a/testsuite/tests/rename/should_compile/rn050.stderr b/testsuite/tests/rename/should_compile/rn050.stderr new file mode 100644 index 0000000000..d323205aed --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn050.stderr @@ -0,0 +1,10 @@ + +rn050.hs:7:1: + Warning: In the use of data constructor `C' + (imported from Rn050_A): + Deprecated: "Use D instead" + +rn050.hs:7:1: + Warning: In the use of `op' + (imported from Rn050_A): + Deprecated: "Use bop instead" diff --git a/testsuite/tests/rename/should_compile/rn051.hs b/testsuite/tests/rename/should_compile/rn051.hs new file mode 100644 index 0000000000..ee5b53ee8e --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn051.hs @@ -0,0 +1,13 @@ +{-# OPTIONS -XNoImplicitPrelude #-} + +-- This one crashed GHC 6.6 in lookupDeprec +-- See Trac #1128 +-- and Note [Used names with interface not loaded] +-- in RnNames + +module ShouldCompile where + +import Prelude + +foo :: Int -> Float +foo x = 3.0 diff --git a/testsuite/tests/rename/should_compile/rn052.hs b/testsuite/tests/rename/should_compile/rn052.hs new file mode 100644 index 0000000000..47e115a25c --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn052.hs @@ -0,0 +1,10 @@ + +module Rn052 where + +import qualified Rn052Aux + +data D = D + +instance Rn052Aux.C D where + f _ = True + diff --git a/testsuite/tests/rename/should_compile/rn053.hs b/testsuite/tests/rename/should_compile/rn053.hs new file mode 100644 index 0000000000..6994bf29bd --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn053.hs @@ -0,0 +1,7 @@ + +module Rn053 (D(C1, C2)) where + +import qualified Rn053_A +import Rn053_A hiding (D(..)) +import Rn053_B + diff --git a/testsuite/tests/rename/should_compile/rn054.hs b/testsuite/tests/rename/should_compile/rn054.hs new file mode 100644 index 0000000000..9706072cb6 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn054.hs @@ -0,0 +1,5 @@ + +module Rn054 where + +import Data.Bits (shiftL) + diff --git a/testsuite/tests/rename/should_compile/rn055.hs b/testsuite/tests/rename/should_compile/rn055.hs new file mode 100644 index 0000000000..d5ec280d4a --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn055.hs @@ -0,0 +1,6 @@ +{-# OPTIONS_GHC -fwarn-implicit-prelude -fwarn-unused-imports #-} +module ShouldCompile where + +-- !!! should produce warnings about implicitly imported Prelude +-- (but not about the implicit import being unused) + diff --git a/testsuite/tests/rename/should_compile/rn055.stderr-ghc b/testsuite/tests/rename/should_compile/rn055.stderr-ghc new file mode 100644 index 0000000000..1b928b46cf --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn055.stderr-ghc @@ -0,0 +1,2 @@ + +rn055.hs:1:1: Warning: Module `Prelude' implicitly imported diff --git a/testsuite/tests/rename/should_compile/rn056.hs b/testsuite/tests/rename/should_compile/rn056.hs new file mode 100644 index 0000000000..5e775dd112 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn056.hs @@ -0,0 +1,9 @@ +{-# OPTIONS_GHC -fwarn-implicit-prelude -fwarn-unused-imports #-} +module ShouldCompile where + +import Prelude () + +-- !!! should produce no warnings +-- (the other use of importing nothing is +-- to nullify the implicit import of the Prelude) + diff --git a/testsuite/tests/rename/should_compile/rn056.stderr b/testsuite/tests/rename/should_compile/rn056.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn056.stderr diff --git a/testsuite/tests/rename/should_compile/rn057.hs b/testsuite/tests/rename/should_compile/rn057.hs new file mode 100644 index 0000000000..b6ca224ffb --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn057.hs @@ -0,0 +1,6 @@ +{-# OPTIONS_GHC -fwarn-implicit-prelude #-} +{-# LANGUAGE NoImplicitPrelude #-} +module ShouldCompile where + +-- !!! should produce no warning + diff --git a/testsuite/tests/rename/should_compile/rn057.stderr b/testsuite/tests/rename/should_compile/rn057.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn057.stderr diff --git a/testsuite/tests/rename/should_compile/rn058.hs b/testsuite/tests/rename/should_compile/rn058.hs new file mode 100644 index 0000000000..838f58b1c7 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn058.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE ForeignFunctionInterface #-} +{-# OPTIONS_GHC -fwarn-unused-imports #-} + +-- Trac #1386 +-- We do not want a warning about unused imports + +module Foo () where + +import Control.Monad (liftM) + +foo :: IO () +foo = id `liftM` return () + +foreign export ccall "hs_foo" foo :: IO () diff --git a/testsuite/tests/rename/should_compile/rn059.hs b/testsuite/tests/rename/should_compile/rn059.hs new file mode 100644 index 0000000000..e46c666433 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn059.hs @@ -0,0 +1,13 @@ +{-# OPTIONS_GHC -XDisambiguateRecordFields #-} + +module Foo () where + +import Rn059_A +import Rn059_B + +a = A { label = 'a' } + +b = B { label = 'b' } + +f (A { label = a }) (B { label = b }) = (a,b) + diff --git a/testsuite/tests/rename/should_compile/rn060.hs b/testsuite/tests/rename/should_compile/rn060.hs new file mode 100644 index 0000000000..aa6ff02191 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn060.hs @@ -0,0 +1,6 @@ + +module Foo (module Data.List) where + +import Data.List +import Data.List as Foo + diff --git a/testsuite/tests/rename/should_compile/rn061.hs b/testsuite/tests/rename/should_compile/rn061.hs new file mode 100644 index 0000000000..caeb1c9e79 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn061.hs @@ -0,0 +1,3 @@ + +module Foo (module Prelude) where + diff --git a/testsuite/tests/rename/should_compile/rn062.hs b/testsuite/tests/rename/should_compile/rn062.hs new file mode 100644 index 0000000000..dbb5493fb9 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn062.hs @@ -0,0 +1,8 @@ +-- Trac #2055 + +module Foo where + +import qualified Data.List + +foo genericReplicate = genericReplicate True + diff --git a/testsuite/tests/rename/should_compile/rn063.hs b/testsuite/tests/rename/should_compile/rn063.hs new file mode 100644 index 0000000000..4f40cce7ee --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn063.hs @@ -0,0 +1,14 @@ + +{-# OPTIONS_GHC -Wall #-} + +module Foo where + +-- We should complain that both x and y are unused. +-- We used to not warn for recursive bindings, like x (trac #2136). + +v :: a +v = let x = x in undefined + +w :: a +w = let y = 'a' in undefined + diff --git a/testsuite/tests/rename/should_compile/rn063.stderr b/testsuite/tests/rename/should_compile/rn063.stderr new file mode 100644 index 0000000000..c437dd3c6a --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn063.stderr @@ -0,0 +1,4 @@ + +rn063.hs:10:9: Warning: Defined but not used: `x' + +rn063.hs:13:9: Warning: Defined but not used: `y' diff --git a/testsuite/tests/rename/should_compile/rn064.hs b/testsuite/tests/rename/should_compile/rn064.hs new file mode 100644 index 0000000000..658d87b348 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn064.hs @@ -0,0 +1,17 @@ + +{-# OPTIONS_GHC -Wall #-} + +module Foo where + +-- We should complain that the first r shadows the second one, and give +-- the right locations for the two of them. (trac #2137) + +z :: a +z = r + where + _a = 'a' + _f r = r + _b = 'b' + r = undefined + _c = 'c' + diff --git a/testsuite/tests/rename/should_compile/rn064.stderr b/testsuite/tests/rename/should_compile/rn064.stderr new file mode 100644 index 0000000000..f23a96bb54 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn064.stderr @@ -0,0 +1,4 @@ + +rn064.hs:13:12: + Warning: This binding for `r' shadows the existing binding + bound at rn064.hs:15:9 diff --git a/testsuite/tests/rename/should_compile/rn065.hs b/testsuite/tests/rename/should_compile/rn065.hs new file mode 100644 index 0000000000..2da09d0d74 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn065.hs @@ -0,0 +1,10 @@ + +{-# LANGUAGE RecordWildCards #-} + +-- trac #1491 + +module Foo where + +import Rn065A + +f T{..} = a + 1 diff --git a/testsuite/tests/rename/should_compile/rn066.hs b/testsuite/tests/rename/should_compile/rn066.hs new file mode 100644 index 0000000000..c41265ecf5 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn066.hs @@ -0,0 +1,13 @@ +{-# OPTIONS_GHC -fwarn-warnings-deprecations #-} + +-- Test warnings on constructors and class ops + +module ShouldCompile where + +import Rn066_A + +instance Foo T where + op x = x + bop y = y + +foo = op C diff --git a/testsuite/tests/rename/should_compile/rn066.stderr b/testsuite/tests/rename/should_compile/rn066.stderr new file mode 100644 index 0000000000..6a95f2f93c --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn066.stderr @@ -0,0 +1,10 @@ + +rn066.hs:7:1: + Warning: In the use of data constructor `C' + (imported from Rn066_A): + "Are you sure you want to do that?" + +rn066.hs:7:1: + Warning: In the use of `op' + (imported from Rn066_A): + "Is that really a good idea?" diff --git a/testsuite/tests/rename/should_compile/rn067.hs b/testsuite/tests/rename/should_compile/rn067.hs new file mode 100644 index 0000000000..d0e2d2ede2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/rn067.hs @@ -0,0 +1,14 @@ + +module ShouldCompile where + +import Rn067_A + +x = 'a' + +-- The use of x here should not be reported as ambiguous, as it refers +-- to the local variable. +-- +-- hugs Sept 2006 says: +-- +-- ERROR "rn067.hs":14 - Ambiguous variable occurrence "x" +test = let x = "" in x diff --git a/testsuite/tests/rename/should_compile/timing001.hs b/testsuite/tests/rename/should_compile/timing001.hs new file mode 100644 index 0000000000..b84b341f19 --- /dev/null +++ b/testsuite/tests/rename/should_compile/timing001.hs @@ -0,0 +1,507 @@ +-- !!! 500 defns chained together at the top-level +module Main(main) where +main = undefined +a000 = a001 +a001 = a002 +a002 = a003 +a003 = a004 +a004 = a005 +a005 = a006 +a006 = a007 +a007 = a008 +a008 = a009 +a009 = a010 +a010 = a011 +a011 = a012 +a012 = a013 +a013 = a014 +a014 = a015 +a015 = a016 +a016 = a017 +a017 = a018 +a018 = a019 +a019 = a020 +a020 = a021 +a021 = a022 +a022 = a023 +a023 = a024 +a024 = a025 +a025 = a026 +a026 = a027 +a027 = a028 +a028 = a029 +a029 = a030 +a030 = a031 +a031 = a032 +a032 = a033 +a033 = a034 +a034 = a035 +a035 = a036 +a036 = a037 +a037 = a038 +a038 = a039 +a039 = a040 +a040 = a041 +a041 = a042 +a042 = a043 +a043 = a044 +a044 = a045 +a045 = a046 +a046 = a047 +a047 = a048 +a048 = a049 +a049 = a050 +a050 = a051 +a051 = a052 +a052 = a053 +a053 = a054 +a054 = a055 +a055 = a056 +a056 = a057 +a057 = a058 +a058 = a059 +a059 = a060 +a060 = a061 +a061 = a062 +a062 = a063 +a063 = a064 +a064 = a065 +a065 = a066 +a066 = a067 +a067 = a068 +a068 = a069 +a069 = a070 +a070 = a071 +a071 = a072 +a072 = a073 +a073 = a074 +a074 = a075 +a075 = a076 +a076 = a077 +a077 = a078 +a078 = a079 +a079 = a080 +a080 = a081 +a081 = a082 +a082 = a083 +a083 = a084 +a084 = a085 +a085 = a086 +a086 = a087 +a087 = a088 +a088 = a089 +a089 = a090 +a090 = a091 +a091 = a092 +a092 = a093 +a093 = a094 +a094 = a095 +a095 = a096 +a096 = a097 +a097 = a098 +a098 = a099 +a099 = a100 + +a100 = a101 +a101 = a102 +a102 = a103 +a103 = a104 +a104 = a105 +a105 = a106 +a106 = a107 +a107 = a108 +a108 = a109 +a109 = a110 +a110 = a111 +a111 = a112 +a112 = a113 +a113 = a114 +a114 = a115 +a115 = a116 +a116 = a117 +a117 = a118 +a118 = a119 +a119 = a120 +a120 = a121 +a121 = a122 +a122 = a123 +a123 = a124 +a124 = a125 +a125 = a126 +a126 = a127 +a127 = a128 +a128 = a129 +a129 = a130 +a130 = a131 +a131 = a132 +a132 = a133 +a133 = a134 +a134 = a135 +a135 = a136 +a136 = a137 +a137 = a138 +a138 = a139 +a139 = a140 +a140 = a141 +a141 = a142 +a142 = a143 +a143 = a144 +a144 = a145 +a145 = a146 +a146 = a147 +a147 = a148 +a148 = a149 +a149 = a150 +a150 = a151 +a151 = a152 +a152 = a153 +a153 = a154 +a154 = a155 +a155 = a156 +a156 = a157 +a157 = a158 +a158 = a159 +a159 = a160 +a160 = a161 +a161 = a162 +a162 = a163 +a163 = a164 +a164 = a165 +a165 = a166 +a166 = a167 +a167 = a168 +a168 = a169 +a169 = a170 +a170 = a171 +a171 = a172 +a172 = a173 +a173 = a174 +a174 = a175 +a175 = a176 +a176 = a177 +a177 = a178 +a178 = a179 +a179 = a180 +a180 = a181 +a181 = a182 +a182 = a183 +a183 = a184 +a184 = a185 +a185 = a186 +a186 = a187 +a187 = a188 +a188 = a189 +a189 = a190 +a190 = a191 +a191 = a192 +a192 = a193 +a193 = a194 +a194 = a195 +a195 = a196 +a196 = a197 +a197 = a198 +a198 = a199 +a199 = a200 + +a200 = a201 +a201 = a202 +a202 = a203 +a203 = a204 +a204 = a205 +a205 = a206 +a206 = a207 +a207 = a208 +a208 = a209 +a209 = a210 +a210 = a211 +a211 = a212 +a212 = a213 +a213 = a214 +a214 = a215 +a215 = a216 +a216 = a217 +a217 = a218 +a218 = a219 +a219 = a220 +a220 = a221 +a221 = a222 +a222 = a223 +a223 = a224 +a224 = a225 +a225 = a226 +a226 = a227 +a227 = a228 +a228 = a229 +a229 = a230 +a230 = a231 +a231 = a232 +a232 = a233 +a233 = a234 +a234 = a235 +a235 = a236 +a236 = a237 +a237 = a238 +a238 = a239 +a239 = a240 +a240 = a241 +a241 = a242 +a242 = a243 +a243 = a244 +a244 = a245 +a245 = a246 +a246 = a247 +a247 = a248 +a248 = a249 +a249 = a250 +a250 = a251 +a251 = a252 +a252 = a253 +a253 = a254 +a254 = a255 +a255 = a256 +a256 = a257 +a257 = a258 +a258 = a259 +a259 = a260 +a260 = a261 +a261 = a262 +a262 = a263 +a263 = a264 +a264 = a265 +a265 = a266 +a266 = a267 +a267 = a268 +a268 = a269 +a269 = a270 +a270 = a271 +a271 = a272 +a272 = a273 +a273 = a274 +a274 = a275 +a275 = a276 +a276 = a277 +a277 = a278 +a278 = a279 +a279 = a280 +a280 = a281 +a281 = a282 +a282 = a283 +a283 = a284 +a284 = a285 +a285 = a286 +a286 = a287 +a287 = a288 +a288 = a289 +a289 = a290 +a290 = a291 +a291 = a292 +a292 = a293 +a293 = a294 +a294 = a295 +a295 = a296 +a296 = a297 +a297 = a298 +a298 = a299 +a299 = a300 + +a300 = a301 +a301 = a302 +a302 = a303 +a303 = a304 +a304 = a305 +a305 = a306 +a306 = a307 +a307 = a308 +a308 = a309 +a309 = a310 +a310 = a311 +a311 = a312 +a312 = a313 +a313 = a314 +a314 = a315 +a315 = a316 +a316 = a317 +a317 = a318 +a318 = a319 +a319 = a320 +a320 = a321 +a321 = a322 +a322 = a323 +a323 = a324 +a324 = a325 +a325 = a326 +a326 = a327 +a327 = a328 +a328 = a329 +a329 = a330 +a330 = a331 +a331 = a332 +a332 = a333 +a333 = a334 +a334 = a335 +a335 = a336 +a336 = a337 +a337 = a338 +a338 = a339 +a339 = a340 +a340 = a341 +a341 = a342 +a342 = a343 +a343 = a344 +a344 = a345 +a345 = a346 +a346 = a347 +a347 = a348 +a348 = a349 +a349 = a350 +a350 = a351 +a351 = a352 +a352 = a353 +a353 = a354 +a354 = a355 +a355 = a356 +a356 = a357 +a357 = a358 +a358 = a359 +a359 = a360 +a360 = a361 +a361 = a362 +a362 = a363 +a363 = a364 +a364 = a365 +a365 = a366 +a366 = a367 +a367 = a368 +a368 = a369 +a369 = a370 +a370 = a371 +a371 = a372 +a372 = a373 +a373 = a374 +a374 = a375 +a375 = a376 +a376 = a377 +a377 = a378 +a378 = a379 +a379 = a380 +a380 = a381 +a381 = a382 +a382 = a383 +a383 = a384 +a384 = a385 +a385 = a386 +a386 = a387 +a387 = a388 +a388 = a389 +a389 = a390 +a390 = a391 +a391 = a392 +a392 = a393 +a393 = a394 +a394 = a395 +a395 = a396 +a396 = a397 +a397 = a398 +a398 = a399 +a399 = a400 + +a400 = a401 +a401 = a402 +a402 = a403 +a403 = a404 +a404 = a405 +a405 = a406 +a406 = a407 +a407 = a408 +a408 = a409 +a409 = a410 +a410 = a411 +a411 = a412 +a412 = a413 +a413 = a414 +a414 = a415 +a415 = a416 +a416 = a417 +a417 = a418 +a418 = a419 +a419 = a420 +a420 = a421 +a421 = a422 +a422 = a423 +a423 = a424 +a424 = a425 +a425 = a426 +a426 = a427 +a427 = a428 +a428 = a429 +a429 = a430 +a430 = a431 +a431 = a432 +a432 = a433 +a433 = a434 +a434 = a435 +a435 = a436 +a436 = a437 +a437 = a438 +a438 = a439 +a439 = a440 +a440 = a441 +a441 = a442 +a442 = a443 +a443 = a444 +a444 = a445 +a445 = a446 +a446 = a447 +a447 = a448 +a448 = a449 +a449 = a450 +a450 = a451 +a451 = a452 +a452 = a453 +a453 = a454 +a454 = a455 +a455 = a456 +a456 = a457 +a457 = a458 +a458 = a459 +a459 = a460 +a460 = a461 +a461 = a462 +a462 = a463 +a463 = a464 +a464 = a465 +a465 = a466 +a466 = a467 +a467 = a468 +a468 = a469 +a469 = a470 +a470 = a471 +a471 = a472 +a472 = a473 +a473 = a474 +a474 = a475 +a475 = a476 +a476 = a477 +a477 = a478 +a478 = a479 +a479 = a480 +a480 = a481 +a481 = a482 +a482 = a483 +a483 = a484 +a484 = a485 +a485 = a486 +a486 = a487 +a487 = a488 +a488 = a489 +a489 = a490 +a490 = a491 +a491 = a492 +a492 = a493 +a493 = a494 +a494 = a495 +a495 = a496 +a496 = a497 +a497 = a498 +a498 = a499 +a499 = [] -- !!! ta-dah!!! diff --git a/testsuite/tests/rename/should_compile/timing001.stderr b/testsuite/tests/rename/should_compile/timing001.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/timing001.stderr diff --git a/testsuite/tests/rename/should_compile/timing002.hs b/testsuite/tests/rename/should_compile/timing002.hs new file mode 100644 index 0000000000..f81b026a67 --- /dev/null +++ b/testsuite/tests/rename/should_compile/timing002.hs @@ -0,0 +1,504 @@ +-- !!! 500 defns chained together with "where"s +module Main(main) where + +main = undefined +a500 = let a000 = [] + a001 = a000 + a002 = a001 + a003 = a002 + a004 = a003 + a005 = a004 + a006 = a005 + a007 = a006 + a008 = a007 + a009 = a008 + a010 = a009 + a011 = a010 + a012 = a011 + a013 = a012 + a014 = a013 + a015 = a014 + a016 = a015 + a017 = a016 + a018 = a017 + a019 = a018 + a020 = a019 + a021 = a020 + a022 = a021 + a023 = a022 + a024 = a023 + a025 = a024 + a026 = a025 + a027 = a026 + a028 = a027 + a029 = a028 + a030 = a029 + a031 = a030 + a032 = a031 + a033 = a032 + a034 = a033 + a035 = a034 + a036 = a035 + a037 = a036 + a038 = a037 + a039 = a038 + a040 = a039 + a041 = a040 + a042 = a041 + a043 = a042 + a044 = a043 + a045 = a044 + a046 = a045 + a047 = a046 + a048 = a047 + a049 = a048 + a050 = a049 + a051 = a050 + a052 = a051 + a053 = a052 + a054 = a053 + a055 = a054 + a056 = a055 + a057 = a056 + a058 = a057 + a059 = a058 + a060 = a059 + a061 = a060 + a062 = a061 + a063 = a062 + a064 = a063 + a065 = a064 + a066 = a065 + a067 = a066 + a068 = a067 + a069 = a068 + a070 = a069 + a071 = a070 + a072 = a071 + a073 = a072 + a074 = a073 + a075 = a074 + a076 = a075 + a077 = a076 + a078 = a077 + a079 = a078 + a080 = a079 + a081 = a080 + a082 = a081 + a083 = a082 + a084 = a083 + a085 = a084 + a086 = a085 + a087 = a086 + a088 = a087 + a089 = a088 + a090 = a089 + a091 = a090 + a092 = a091 + a093 = a092 + a094 = a093 + a095 = a094 + a096 = a095 + a097 = a096 + a098 = a097 + a099 = a098 + a100 = a099 + a101 = a100 + a102 = a101 + a103 = a102 + a104 = a103 + a105 = a104 + a106 = a105 + a107 = a106 + a108 = a107 + a109 = a108 + a110 = a109 + a111 = a110 + a112 = a111 + a113 = a112 + a114 = a113 + a115 = a114 + a116 = a115 + a117 = a116 + a118 = a117 + a119 = a118 + a120 = a119 + a121 = a120 + a122 = a121 + a123 = a122 + a124 = a123 + a125 = a124 + a126 = a125 + a127 = a126 + a128 = a127 + a129 = a128 + a130 = a129 + a131 = a130 + a132 = a131 + a133 = a132 + a134 = a133 + a135 = a134 + a136 = a135 + a137 = a136 + a138 = a137 + a139 = a138 + a140 = a139 + a141 = a140 + a142 = a141 + a143 = a142 + a144 = a143 + a145 = a144 + a146 = a145 + a147 = a146 + a148 = a147 + a149 = a148 + a150 = a149 + a151 = a150 + a152 = a151 + a153 = a152 + a154 = a153 + a155 = a154 + a156 = a155 + a157 = a156 + a158 = a157 + a159 = a158 + a160 = a159 + a161 = a160 + a162 = a161 + a163 = a162 + a164 = a163 + a165 = a164 + a166 = a165 + a167 = a166 + a168 = a167 + a169 = a168 + a170 = a169 + a171 = a170 + a172 = a171 + a173 = a172 + a174 = a173 + a175 = a174 + a176 = a175 + a177 = a176 + a178 = a177 + a179 = a178 + a180 = a179 + a181 = a180 + a182 = a181 + a183 = a182 + a184 = a183 + a185 = a184 + a186 = a185 + a187 = a186 + a188 = a187 + a189 = a188 + a190 = a189 + a191 = a190 + a192 = a191 + a193 = a192 + a194 = a193 + a195 = a194 + a196 = a195 + a197 = a196 + a198 = a197 + a199 = a198 + a200 = a199 + a201 = a200 + a202 = a201 + a203 = a202 + a204 = a203 + a205 = a204 + a206 = a205 + a207 = a206 + a208 = a207 + a209 = a208 + a210 = a209 + a211 = a210 + a212 = a211 + a213 = a212 + a214 = a213 + a215 = a214 + a216 = a215 + a217 = a216 + a218 = a217 + a219 = a218 + a220 = a219 + a221 = a220 + a222 = a221 + a223 = a222 + a224 = a223 + a225 = a224 + a226 = a225 + a227 = a226 + a228 = a227 + a229 = a228 + a230 = a229 + a231 = a230 + a232 = a231 + a233 = a232 + a234 = a233 + a235 = a234 + a236 = a235 + a237 = a236 + a238 = a237 + a239 = a238 + a240 = a239 + a241 = a240 + a242 = a241 + a243 = a242 + a244 = a243 + a245 = a244 + a246 = a245 + a247 = a246 + a248 = a247 + a249 = a248 + a250 = a249 + a251 = a250 + a252 = a251 + a253 = a252 + a254 = a253 + a255 = a254 + a256 = a255 + a257 = a256 + a258 = a257 + a259 = a258 + a260 = a259 + a261 = a260 + a262 = a261 + a263 = a262 + a264 = a263 + a265 = a264 + a266 = a265 + a267 = a266 + a268 = a267 + a269 = a268 + a270 = a269 + a271 = a270 + a272 = a271 + a273 = a272 + a274 = a273 + a275 = a274 + a276 = a275 + a277 = a276 + a278 = a277 + a279 = a278 + a280 = a279 + a281 = a280 + a282 = a281 + a283 = a282 + a284 = a283 + a285 = a284 + a286 = a285 + a287 = a286 + a288 = a287 + a289 = a288 + a290 = a289 + a291 = a290 + a292 = a291 + a293 = a292 + a294 = a293 + a295 = a294 + a296 = a295 + a297 = a296 + a298 = a297 + a299 = a298 + a300 = a299 + a301 = a300 + a302 = a301 + a303 = a302 + a304 = a303 + a305 = a304 + a306 = a305 + a307 = a306 + a308 = a307 + a309 = a308 + a310 = a309 + a311 = a310 + a312 = a311 + a313 = a312 + a314 = a313 + a315 = a314 + a316 = a315 + a317 = a316 + a318 = a317 + a319 = a318 + a320 = a319 + a321 = a320 + a322 = a321 + a323 = a322 + a324 = a323 + a325 = a324 + a326 = a325 + a327 = a326 + a328 = a327 + a329 = a328 + a330 = a329 + a331 = a330 + a332 = a331 + a333 = a332 + a334 = a333 + a335 = a334 + a336 = a335 + a337 = a336 + a338 = a337 + a339 = a338 + a340 = a339 + a341 = a340 + a342 = a341 + a343 = a342 + a344 = a343 + a345 = a344 + a346 = a345 + a347 = a346 + a348 = a347 + a349 = a348 + a350 = a349 + a351 = a350 + a352 = a351 + a353 = a352 + a354 = a353 + a355 = a354 + a356 = a355 + a357 = a356 + a358 = a357 + a359 = a358 + a360 = a359 + a361 = a360 + a362 = a361 + a363 = a362 + a364 = a363 + a365 = a364 + a366 = a365 + a367 = a366 + a368 = a367 + a369 = a368 + a370 = a369 + a371 = a370 + a372 = a371 + a373 = a372 + a374 = a373 + a375 = a374 + a376 = a375 + a377 = a376 + a378 = a377 + a379 = a378 + a380 = a379 + a381 = a380 + a382 = a381 + a383 = a382 + a384 = a383 + a385 = a384 + a386 = a385 + a387 = a386 + a388 = a387 + a389 = a388 + a390 = a389 + a391 = a390 + a392 = a391 + a393 = a392 + a394 = a393 + a395 = a394 + a396 = a395 + a397 = a396 + a398 = a397 + a399 = a398 + a400 = a399 + a401 = a400 + a402 = a401 + a403 = a402 + a404 = a403 + a405 = a404 + a406 = a405 + a407 = a406 + a408 = a407 + a409 = a408 + a410 = a409 + a411 = a410 + a412 = a411 + a413 = a412 + a414 = a413 + a415 = a414 + a416 = a415 + a417 = a416 + a418 = a417 + a419 = a418 + a420 = a419 + a421 = a420 + a422 = a421 + a423 = a422 + a424 = a423 + a425 = a424 + a426 = a425 + a427 = a426 + a428 = a427 + a429 = a428 + a430 = a429 + a431 = a430 + a432 = a431 + a433 = a432 + a434 = a433 + a435 = a434 + a436 = a435 + a437 = a436 + a438 = a437 + a439 = a438 + a440 = a439 + a441 = a440 + a442 = a441 + a443 = a442 + a444 = a443 + a445 = a444 + a446 = a445 + a447 = a446 + a448 = a447 + a449 = a448 + a450 = a449 + a451 = a450 + a452 = a451 + a453 = a452 + a454 = a453 + a455 = a454 + a456 = a455 + a457 = a456 + a458 = a457 + a459 = a458 + a460 = a459 + a461 = a460 + a462 = a461 + a463 = a462 + a464 = a463 + a465 = a464 + a466 = a465 + a467 = a466 + a468 = a467 + a469 = a468 + a470 = a469 + a471 = a470 + a472 = a471 + a473 = a472 + a474 = a473 + a475 = a474 + a476 = a475 + a477 = a476 + a478 = a477 + a479 = a478 + a480 = a479 + a481 = a480 + a482 = a481 + a483 = a482 + a484 = a483 + a485 = a484 + a486 = a485 + a487 = a486 + a488 = a487 + a489 = a488 + a490 = a489 + a491 = a490 + a492 = a491 + a493 = a492 + a494 = a493 + a495 = a494 + a496 = a495 + a497 = a496 + a498 = a497 in + a498 diff --git a/testsuite/tests/rename/should_compile/timing002.stderr b/testsuite/tests/rename/should_compile/timing002.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/timing002.stderr diff --git a/testsuite/tests/rename/should_compile/timing003.hs b/testsuite/tests/rename/should_compile/timing003.hs new file mode 100644 index 0000000000..c268646daf --- /dev/null +++ b/testsuite/tests/rename/should_compile/timing003.hs @@ -0,0 +1,508 @@ +-- !!! 500 defns, not chained together +module Main(main) where + +main = undefined +a000 = [] +a001 = [] +a002 = [] +a003 = [] +a004 = [] +a005 = [] +a006 = [] +a007 = [] +a008 = [] +a009 = [] +a010 = [] +a011 = [] +a012 = [] +a013 = [] +a014 = [] +a015 = [] +a016 = [] +a017 = [] +a018 = [] +a019 = [] +a020 = [] +a021 = [] +a022 = [] +a023 = [] +a024 = [] +a025 = [] +a026 = [] +a027 = [] +a028 = [] +a029 = [] +a030 = [] +a031 = [] +a032 = [] +a033 = [] +a034 = [] +a035 = [] +a036 = [] +a037 = [] +a038 = [] +a039 = [] +a040 = [] +a041 = [] +a042 = [] +a043 = [] +a044 = [] +a045 = [] +a046 = [] +a047 = [] +a048 = [] +a049 = [] +a050 = [] +a051 = [] +a052 = [] +a053 = [] +a054 = [] +a055 = [] +a056 = [] +a057 = [] +a058 = [] +a059 = [] +a060 = [] +a061 = [] +a062 = [] +a063 = [] +a064 = [] +a065 = [] +a066 = [] +a067 = [] +a068 = [] +a069 = [] +a070 = [] +a071 = [] +a072 = [] +a073 = [] +a074 = [] +a075 = [] +a076 = [] +a077 = [] +a078 = [] +a079 = [] +a080 = [] +a081 = [] +a082 = [] +a083 = [] +a084 = [] +a085 = [] +a086 = [] +a087 = [] +a088 = [] +a089 = [] +a090 = [] +a091 = [] +a092 = [] +a093 = [] +a094 = [] +a095 = [] +a096 = [] +a097 = [] +a098 = [] +a099 = [] + +a100 = [] +a101 = [] +a102 = [] +a103 = [] +a104 = [] +a105 = [] +a106 = [] +a107 = [] +a108 = [] +a109 = [] +a110 = [] +a111 = [] +a112 = [] +a113 = [] +a114 = [] +a115 = [] +a116 = [] +a117 = [] +a118 = [] +a119 = [] +a120 = [] +a121 = [] +a122 = [] +a123 = [] +a124 = [] +a125 = [] +a126 = [] +a127 = [] +a128 = [] +a129 = [] +a130 = [] +a131 = [] +a132 = [] +a133 = [] +a134 = [] +a135 = [] +a136 = [] +a137 = [] +a138 = [] +a139 = [] +a140 = [] +a141 = [] +a142 = [] +a143 = [] +a144 = [] +a145 = [] +a146 = [] +a147 = [] +a148 = [] +a149 = [] +a150 = [] +a151 = [] +a152 = [] +a153 = [] +a154 = [] +a155 = [] +a156 = [] +a157 = [] +a158 = [] +a159 = [] +a160 = [] +a161 = [] +a162 = [] +a163 = [] +a164 = [] +a165 = [] +a166 = [] +a167 = [] +a168 = [] +a169 = [] +a170 = [] +a171 = [] +a172 = [] +a173 = [] +a174 = [] +a175 = [] +a176 = [] +a177 = [] +a178 = [] +a179 = [] +a180 = [] +a181 = [] +a182 = [] +a183 = [] +a184 = [] +a185 = [] +a186 = [] +a187 = [] +a188 = [] +a189 = [] +a190 = [] +a191 = [] +a192 = [] +a193 = [] +a194 = [] +a195 = [] +a196 = [] +a197 = [] +a198 = [] +a199 = [] + +a200 = [] +a201 = [] +a202 = [] +a203 = [] +a204 = [] +a205 = [] +a206 = [] +a207 = [] +a208 = [] +a209 = [] +a210 = [] +a211 = [] +a212 = [] +a213 = [] +a214 = [] +a215 = [] +a216 = [] +a217 = [] +a218 = [] +a219 = [] +a220 = [] +a221 = [] +a222 = [] +a223 = [] +a224 = [] +a225 = [] +a226 = [] +a227 = [] +a228 = [] +a229 = [] +a230 = [] +a231 = [] +a232 = [] +a233 = [] +a234 = [] +a235 = [] +a236 = [] +a237 = [] +a238 = [] +a239 = [] +a240 = [] +a241 = [] +a242 = [] +a243 = [] +a244 = [] +a245 = [] +a246 = [] +a247 = [] +a248 = [] +a249 = [] +a250 = [] +a251 = [] +a252 = [] +a253 = [] +a254 = [] +a255 = [] +a256 = [] +a257 = [] +a258 = [] +a259 = [] +a260 = [] +a261 = [] +a262 = [] +a263 = [] +a264 = [] +a265 = [] +a266 = [] +a267 = [] +a268 = [] +a269 = [] +a270 = [] +a271 = [] +a272 = [] +a273 = [] +a274 = [] +a275 = [] +a276 = [] +a277 = [] +a278 = [] +a279 = [] +a280 = [] +a281 = [] +a282 = [] +a283 = [] +a284 = [] +a285 = [] +a286 = [] +a287 = [] +a288 = [] +a289 = [] +a290 = [] +a291 = [] +a292 = [] +a293 = [] +a294 = [] +a295 = [] +a296 = [] +a297 = [] +a298 = [] +a299 = [] + +a300 = [] +a301 = [] +a302 = [] +a303 = [] +a304 = [] +a305 = [] +a306 = [] +a307 = [] +a308 = [] +a309 = [] +a310 = [] +a311 = [] +a312 = [] +a313 = [] +a314 = [] +a315 = [] +a316 = [] +a317 = [] +a318 = [] +a319 = [] +a320 = [] +a321 = [] +a322 = [] +a323 = [] +a324 = [] +a325 = [] +a326 = [] +a327 = [] +a328 = [] +a329 = [] +a330 = [] +a331 = [] +a332 = [] +a333 = [] +a334 = [] +a335 = [] +a336 = [] +a337 = [] +a338 = [] +a339 = [] +a340 = [] +a341 = [] +a342 = [] +a343 = [] +a344 = [] +a345 = [] +a346 = [] +a347 = [] +a348 = [] +a349 = [] +a350 = [] +a351 = [] +a352 = [] +a353 = [] +a354 = [] +a355 = [] +a356 = [] +a357 = [] +a358 = [] +a359 = [] +a360 = [] +a361 = [] +a362 = [] +a363 = [] +a364 = [] +a365 = [] +a366 = [] +a367 = [] +a368 = [] +a369 = [] +a370 = [] +a371 = [] +a372 = [] +a373 = [] +a374 = [] +a375 = [] +a376 = [] +a377 = [] +a378 = [] +a379 = [] +a380 = [] +a381 = [] +a382 = [] +a383 = [] +a384 = [] +a385 = [] +a386 = [] +a387 = [] +a388 = [] +a389 = [] +a390 = [] +a391 = [] +a392 = [] +a393 = [] +a394 = [] +a395 = [] +a396 = [] +a397 = [] +a398 = [] +a399 = [] + +a400 = [] +a401 = [] +a402 = [] +a403 = [] +a404 = [] +a405 = [] +a406 = [] +a407 = [] +a408 = [] +a409 = [] +a410 = [] +a411 = [] +a412 = [] +a413 = [] +a414 = [] +a415 = [] +a416 = [] +a417 = [] +a418 = [] +a419 = [] +a420 = [] +a421 = [] +a422 = [] +a423 = [] +a424 = [] +a425 = [] +a426 = [] +a427 = [] +a428 = [] +a429 = [] +a430 = [] +a431 = [] +a432 = [] +a433 = [] +a434 = [] +a435 = [] +a436 = [] +a437 = [] +a438 = [] +a439 = [] +a440 = [] +a441 = [] +a442 = [] +a443 = [] +a444 = [] +a445 = [] +a446 = [] +a447 = [] +a448 = [] +a449 = [] +a450 = [] +a451 = [] +a452 = [] +a453 = [] +a454 = [] +a455 = [] +a456 = [] +a457 = [] +a458 = [] +a459 = [] +a460 = [] +a461 = [] +a462 = [] +a463 = [] +a464 = [] +a465 = [] +a466 = [] +a467 = [] +a468 = [] +a469 = [] +a470 = [] +a471 = [] +a472 = [] +a473 = [] +a474 = [] +a475 = [] +a476 = [] +a477 = [] +a478 = [] +a479 = [] +a480 = [] +a481 = [] +a482 = [] +a483 = [] +a484 = [] +a485 = [] +a486 = [] +a487 = [] +a488 = [] +a489 = [] +a490 = [] +a491 = [] +a492 = [] +a493 = [] +a494 = [] +a495 = [] +a496 = [] +a497 = [] +a498 = [] +a499 = [] diff --git a/testsuite/tests/rename/should_compile/timing003.stderr b/testsuite/tests/rename/should_compile/timing003.stderr new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/testsuite/tests/rename/should_compile/timing003.stderr |