diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2014-09-16 19:19:25 +0200 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2014-09-16 22:43:17 +0200 |
commit | b47521991a7574f4f3554f7c5444a8c60cfe9efd (patch) | |
tree | 55bfb1876f31b841ae9d750aa87489ed6d2dc667 /testsuite | |
parent | e7a0f5b66ced8d56d770375e4d35d38c70067559 (diff) | |
download | haskell-b47521991a7574f4f3554f7c5444a8c60cfe9efd.tar.gz |
Move `Maybe`-typedef into GHC.Base
This is preparatory work for reintroducing SPECIALISEs that were lost
in d94de87252d0fe2ae97341d186b03a2fbe136b04
Differential Revision: https://phabricator.haskell.org/D214
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/ghci/scripts/T4175.stdout | 12 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci023.stdout | 2 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci026.stdout | 30 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_compile/spec-inline.stderr | 38 | ||||
-rw-r--r-- | testsuite/tests/th/ClosedFam1TH.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/th/T4135.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/th/T5037.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/th/TH_RichKinds2.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/th/TH_reifyDecl2.stderr | 3 | ||||
-rw-r--r-- | testsuite/tests/th/TH_repGuard.stderr | 14 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T5095.stderr | 1 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail072.stderr | 5 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail181.stderr | 3 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_fail/tcfail182.stderr | 2 |
14 files changed, 64 insertions, 64 deletions
diff --git a/testsuite/tests/ghci/scripts/T4175.stdout b/testsuite/tests/ghci/scripts/T4175.stdout index 2a75b0da6a..e439528965 100644 --- a/testsuite/tests/ghci/scripts/T4175.stdout +++ b/testsuite/tests/ghci/scripts/T4175.stdout @@ -28,14 +28,14 @@ instance Show () -- Defined in ‘GHC.Show’ type instance D () () = Bool -- Defined at T4175.hs:22:5 type instance D Int () = String -- Defined at T4175.hs:19:5 data instance B () = MkB -- Defined at T4175.hs:13:15 -data Maybe a = Nothing | Just a -- Defined in ‘Data.Maybe’ -instance Eq a => Eq (Maybe a) -- Defined in ‘Data.Maybe’ -instance Monad Maybe -- Defined in ‘Data.Maybe’ -instance Functor Maybe -- Defined in ‘Data.Maybe’ -instance Ord a => Ord (Maybe a) -- Defined in ‘Data.Maybe’ +data Maybe a = Nothing | Just a -- Defined in ‘GHC.Base’ +instance Eq a => Eq (Maybe a) -- Defined in ‘GHC.Base’ +instance Monad Maybe -- Defined in ‘GHC.Base’ +instance Functor Maybe -- Defined in ‘GHC.Base’ +instance Ord a => Ord (Maybe a) -- Defined in ‘GHC.Base’ instance Read a => Read (Maybe a) -- Defined in ‘GHC.Read’ instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’ -instance Applicative Maybe -- Defined in ‘Data.Maybe’ +instance Applicative Maybe -- Defined in ‘GHC.Base’ instance Foldable Maybe -- Defined in ‘Data.Foldable’ instance Traversable Maybe -- Defined in ‘Data.Traversable’ type instance A (Maybe a) a = a -- Defined at T4175.hs:9:1 diff --git a/testsuite/tests/ghci/scripts/ghci023.stdout b/testsuite/tests/ghci/scripts/ghci023.stdout index 5f19876614..51c1b9196a 100644 --- a/testsuite/tests/ghci/scripts/ghci023.stdout +++ b/testsuite/tests/ghci/scripts/ghci023.stdout @@ -1,7 +1,6 @@ -- testing ghci multiline commands :{ .. :} -- via stdin (1,2,3) -data Maybe a = Nothing | Just a Data.Maybe.catMaybes :: [Maybe a] -> [a] Data.Maybe.fromJust :: Maybe a -> a Data.Maybe.fromMaybe :: a -> Maybe a -> a @@ -11,6 +10,7 @@ Data.Maybe.listToMaybe :: [a] -> Maybe a Data.Maybe.mapMaybe :: (a -> Maybe b) -> [a] -> [b] maybe :: b -> (a -> b) -> Maybe a -> b Data.Maybe.maybeToList :: Maybe a -> [a] +data Maybe a = Nothing | Just a -- via readFile (True,False) id :: a -> a diff --git a/testsuite/tests/ghci/scripts/ghci026.stdout b/testsuite/tests/ghci/scripts/ghci026.stdout index 163cca29b6..9fb27908e6 100644 --- a/testsuite/tests/ghci/scripts/ghci026.stdout +++ b/testsuite/tests/ghci/scripts/ghci026.stdout @@ -1,15 +1,15 @@ -data Maybe a = Nothing | Just a
-catMaybes :: [Maybe a] -> [a]
-fromJust :: Maybe a -> a
-fromMaybe :: a -> Maybe a -> a
-isJust :: Maybe a -> Bool
-isNothing :: Maybe a -> Bool
-listToMaybe :: [a] -> Maybe a
-mapMaybe :: (a -> Maybe b) -> [a] -> [b]
-maybe :: b -> (a -> b) -> Maybe a -> b
-maybeToList :: Maybe a -> [a]
-data T = A Int | B Float
-f :: Double -> Double
-g :: Double -> Double
-h :: Integral a => a -> a
-f :: Double -> Double
+catMaybes :: [Maybe a] -> [a] +fromJust :: Maybe a -> a +fromMaybe :: a -> Maybe a -> a +isJust :: Maybe a -> Bool +isNothing :: Maybe a -> Bool +listToMaybe :: [a] -> Maybe a +mapMaybe :: (a -> Maybe b) -> [a] -> [b] +maybe :: b -> (a -> b) -> Maybe a -> b +maybeToList :: Maybe a -> [a] +data Maybe a = Nothing | Just a +data T = A Int | B Float +f :: Double -> Double +g :: Double -> Double +h :: Integral a => a -> a +f :: Double -> Double diff --git a/testsuite/tests/simplCore/should_compile/spec-inline.stderr b/testsuite/tests/simplCore/should_compile/spec-inline.stderr index 1e11fd618b..aee86c36fa 100644 --- a/testsuite/tests/simplCore/should_compile/spec-inline.stderr +++ b/testsuite/tests/simplCore/should_compile/spec-inline.stderr @@ -43,19 +43,19 @@ Roman.foo_$s$wgo = end Rec } Roman.$wgo [InlPrag=[0]] - :: Data.Maybe.Maybe GHC.Types.Int - -> Data.Maybe.Maybe GHC.Types.Int -> GHC.Prim.Int# + :: GHC.Base.Maybe GHC.Types.Int + -> GHC.Base.Maybe GHC.Types.Int -> GHC.Prim.Int# [GblId, Arity=2, Str=DmdType <S,1*U><S,1*U>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [60 30] 256 0}] Roman.$wgo = - \ (w :: Data.Maybe.Maybe GHC.Types.Int) - (w1 :: Data.Maybe.Maybe GHC.Types.Int) -> + \ (w :: GHC.Base.Maybe GHC.Types.Int) + (w1 :: GHC.Base.Maybe GHC.Types.Int) -> case w1 of _ [Occ=Dead] { - Data.Maybe.Nothing -> case Roman.foo3 of wild1 { }; - Data.Maybe.Just x -> + GHC.Base.Nothing -> case Roman.foo3 of wild1 { }; + GHC.Base.Just x -> case x of _ [Occ=Dead] { GHC.Types.I# ipv -> let { a :: GHC.Prim.Int# @@ -68,8 +68,8 @@ Roman.$wgo = ipv) ipv } in case w of _ [Occ=Dead] { - Data.Maybe.Nothing -> Roman.foo_$s$wgo 10 a; - Data.Maybe.Just n -> + GHC.Base.Nothing -> Roman.foo_$s$wgo 10 a; + GHC.Base.Just n -> case n of _ [Occ=Dead] { GHC.Types.I# x2 -> case GHC.Prim.tagToEnum# @ GHC.Types.Bool (GHC.Prim.<=# x2 0) of _ [Occ=Dead] { @@ -93,20 +93,20 @@ Roman.$wgo = } Roman.foo_go [InlPrag=INLINE[0]] - :: Data.Maybe.Maybe GHC.Types.Int - -> Data.Maybe.Maybe GHC.Types.Int -> GHC.Types.Int + :: GHC.Base.Maybe GHC.Types.Int + -> GHC.Base.Maybe GHC.Types.Int -> GHC.Types.Int [GblId, Arity=2, Str=DmdType <S,1*U><S,1*U>m, Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False) - Tmpl= \ (w [Occ=Once] :: Data.Maybe.Maybe GHC.Types.Int) - (w1 [Occ=Once] :: Data.Maybe.Maybe GHC.Types.Int) -> + Tmpl= \ (w [Occ=Once] :: GHC.Base.Maybe GHC.Types.Int) + (w1 [Occ=Once] :: GHC.Base.Maybe GHC.Types.Int) -> case Roman.$wgo w w1 of ww { __DEFAULT -> GHC.Types.I# ww }}] Roman.foo_go = - \ (w :: Data.Maybe.Maybe GHC.Types.Int) - (w1 :: Data.Maybe.Maybe GHC.Types.Int) -> + \ (w :: GHC.Base.Maybe GHC.Types.Int) + (w1 :: GHC.Base.Maybe GHC.Types.Int) -> case Roman.$wgo w w1 of ww { __DEFAULT -> GHC.Types.I# ww } Roman.foo2 :: GHC.Types.Int @@ -117,13 +117,13 @@ Roman.foo2 :: GHC.Types.Int WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] Roman.foo2 = GHC.Types.I# 6 -Roman.foo1 :: Data.Maybe.Maybe GHC.Types.Int +Roman.foo1 :: GHC.Base.Maybe GHC.Types.Int [GblId, Caf=NoCafRefs, Str=DmdType m2, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] -Roman.foo1 = Data.Maybe.Just @ GHC.Types.Int Roman.foo2 +Roman.foo1 = GHC.Base.Just @ GHC.Types.Int Roman.foo2 Roman.foo :: GHC.Types.Int -> GHC.Types.Int [GblId, @@ -135,7 +135,7 @@ Roman.foo :: GHC.Types.Int -> GHC.Types.Int Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) Tmpl= \ (n [Occ=Once!] :: GHC.Types.Int) -> case n of n1 { GHC.Types.I# _ [Occ=Dead] -> - Roman.foo_go (Data.Maybe.Just @ GHC.Types.Int n1) Roman.foo1 + Roman.foo_go (GHC.Base.Just @ GHC.Types.Int n1) Roman.foo1 }}] Roman.foo = \ (n :: GHC.Types.Int) -> @@ -147,8 +147,8 @@ Roman.foo = ------ Local rules for imported ids -------- "SC:$wgo0" [0] forall (sc :: GHC.Prim.Int#) (sc1 :: GHC.Prim.Int#). - Roman.$wgo (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc)) - (Data.Maybe.Just @ GHC.Types.Int (GHC.Types.I# sc1)) + Roman.$wgo (GHC.Base.Just @ GHC.Types.Int (GHC.Types.I# sc)) + (GHC.Base.Just @ GHC.Types.Int (GHC.Types.I# sc1)) = Roman.foo_$s$wgo sc sc1 diff --git a/testsuite/tests/th/ClosedFam1TH.stderr b/testsuite/tests/th/ClosedFam1TH.stderr index b2d0a9bac4..8855da204f 100644 --- a/testsuite/tests/th/ClosedFam1TH.stderr +++ b/testsuite/tests/th/ClosedFam1TH.stderr @@ -2,5 +2,5 @@ ClosedFam1TH.hs:7:3: Warning: type family Foo_0 a_1 (b_2 :: k_3) where Foo_0 GHC.Types.Int GHC.Types.Bool = GHC.Types.Int - Foo_0 a_4 Data.Maybe.Maybe = GHC.Types.Bool + Foo_0 a_4 GHC.Base.Maybe = GHC.Types.Bool Foo_0 b_5 (x_6 :: GHC.Types.Bool) = GHC.Types.Char diff --git a/testsuite/tests/th/T4135.stderr b/testsuite/tests/th/T4135.stderr index 30df0def66..c666082754 100644 --- a/testsuite/tests/th/T4135.stderr +++ b/testsuite/tests/th/T4135.stderr @@ -1,2 +1,2 @@ -instance Bug.C (Data.Maybe.Maybe a_0) - where type Bug.T (Data.Maybe.Maybe a_0) = GHC.Types.Char +instance Bug.C (GHC.Base.Maybe a_0) + where type Bug.T (GHC.Base.Maybe a_0) = GHC.Types.Char diff --git a/testsuite/tests/th/T5037.stderr b/testsuite/tests/th/T5037.stderr index 391368c93b..944cfa5c8c 100644 --- a/testsuite/tests/th/T5037.stderr +++ b/testsuite/tests/th/T5037.stderr @@ -1,3 +1,3 @@ -f_0 :: Data.Maybe.Maybe GHC.Types.Int -> GHC.Types.Int
-f_0 (Data.Maybe.Nothing) = 3
-f_0 (Data.Maybe.Just x_1) = x
+f_0 :: GHC.Base.Maybe GHC.Types.Int -> GHC.Types.Int +f_0 (GHC.Base.Nothing) = 3 +f_0 (GHC.Base.Just x_1) = x diff --git a/testsuite/tests/th/TH_RichKinds2.stderr b/testsuite/tests/th/TH_RichKinds2.stderr index 8370df332d..45027d5c1c 100644 --- a/testsuite/tests/th/TH_RichKinds2.stderr +++ b/testsuite/tests/th/TH_RichKinds2.stderr @@ -1,8 +1,8 @@ TH_RichKinds2.hs:23:4: Warning: - data SMaybe_0 (t_1 :: k_0 -> *) (t_3 :: Data.Maybe.Maybe k_0) - = forall . t_3 ~ 'Data.Maybe.Nothing => SNothing_4 - | forall a_5 . t_3 ~ 'Data.Maybe.Just a_5 => SJust_6 (t_1 a_5) + data SMaybe_0 (t_1 :: k_0 -> *) (t_3 :: GHC.Base.Maybe k_0) + = forall . t_3 ~ 'GHC.Base.Nothing => SNothing_4 + | forall a_5 . t_3 ~ 'GHC.Base.Just a_5 => SJust_6 (t_1 a_5) type instance TH_RichKinds2.Map f_7 'GHC.Types.[] = 'GHC.Types.[] type instance TH_RichKinds2.Map f_8 ('GHC.Types.: h_9 t_10) = 'GHC.Types.: (f_8 h_9) diff --git a/testsuite/tests/th/TH_reifyDecl2.stderr b/testsuite/tests/th/TH_reifyDecl2.stderr index 802cf293c6..3711f8e224 100644 --- a/testsuite/tests/th/TH_reifyDecl2.stderr +++ b/testsuite/tests/th/TH_reifyDecl2.stderr @@ -1,2 +1 @@ -data Data.Maybe.Maybe a_0 - = Data.Maybe.Nothing | Data.Maybe.Just a_0 +data GHC.Base.Maybe a_0 = GHC.Base.Nothing | GHC.Base.Just a_0 diff --git a/testsuite/tests/th/TH_repGuard.stderr b/testsuite/tests/th/TH_repGuard.stderr index c0a4dd7cba..bbef7eed59 100644 --- a/testsuite/tests/th/TH_repGuard.stderr +++ b/testsuite/tests/th/TH_repGuard.stderr @@ -1,7 +1,7 @@ -foo_0 :: GHC.Types.Int -> GHC.Types.Int
-foo_0 x_1 | x_1 GHC.Classes.== 5 = 6
-foo_0 x_2 = 7
-bar_0 :: Data.Maybe.Maybe GHC.Types.Int -> GHC.Types.Int
-bar_0 x_1 | Data.Maybe.Just y_2 <- x_1
- = y_2
-bar_0 _ = 9
+foo_0 :: GHC.Types.Int -> GHC.Types.Int +foo_0 x_1 | x_1 GHC.Classes.== 5 = 6 +foo_0 x_2 = 7 +bar_0 :: GHC.Base.Maybe GHC.Types.Int -> GHC.Types.Int +bar_0 x_1 | GHC.Base.Just y_2 <- x_1 + = y_2 +bar_0 _ = 9 diff --git a/testsuite/tests/typecheck/should_fail/T5095.stderr b/testsuite/tests/typecheck/should_fail/T5095.stderr index 55342cdf33..82613e64d9 100644 --- a/testsuite/tests/typecheck/should_fail/T5095.stderr +++ b/testsuite/tests/typecheck/should_fail/T5095.stderr @@ -3,6 +3,7 @@ T5095.hs:9:11: Overlapping instances for Eq a arising from a use of ‘==’ Matching instances: instance [overlappable] Show a => Eq a -- Defined at T5095.hs:5:31 + instance Eq a => Eq (Maybe a) -- Defined in ‘GHC.Base’ instance Eq () -- Defined in ‘GHC.Classes’ instance (Eq a, Eq b) => Eq (a, b) -- Defined in ‘GHC.Classes’ instance (Eq a, Eq b, Eq c) => Eq (a, b, c) diff --git a/testsuite/tests/typecheck/should_fail/tcfail072.stderr b/testsuite/tests/typecheck/should_fail/tcfail072.stderr index 37bb8b3ad3..64486c1cb0 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail072.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail072.stderr @@ -7,10 +7,9 @@ tcfail072.hs:23:13: at tcfail072.hs:22:6-38 The type variable ‘q0’ is ambiguous Note: there are several potential instances: + instance Ord a => Ord (Maybe a) -- Defined in ‘GHC.Base’ instance Ord () -- Defined in ‘GHC.Classes’ instance (Ord a, Ord b) => Ord (a, b) -- Defined in ‘GHC.Classes’ - instance (Ord a, Ord b, Ord c) => Ord (a, b, c) - -- Defined in ‘GHC.Classes’ - ...plus 21 others + ...plus 22 others In the expression: g A In an equation for ‘g’: g (B _ _) = g A diff --git a/testsuite/tests/typecheck/should_fail/tcfail181.stderr b/testsuite/tests/typecheck/should_fail/tcfail181.stderr index 3502f2bbea..7ec625bac1 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail181.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail181.stderr @@ -9,7 +9,8 @@ tcfail181.hs:17:9: Note: there are several potential instances: instance Monad ((->) r) -- Defined in ‘GHC.Base’ instance Monad IO -- Defined in ‘GHC.Base’ - instance Monad [] -- Defined in ‘GHC.Base’ + instance Monad Maybe -- Defined in ‘GHC.Base’ + ...plus one other In the expression: foo In the expression: foo {bar = return True} In an equation for ‘wog’: wog x = foo {bar = return True} diff --git a/testsuite/tests/typecheck/should_fail/tcfail182.stderr b/testsuite/tests/typecheck/should_fail/tcfail182.stderr index 373e6dcad5..dfc57e2a03 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail182.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail182.stderr @@ -3,7 +3,7 @@ tcfail182.hs:9:3: Couldn't match expected type ‘Prelude.Maybe a’ with actual type ‘Maybe t0’ NB: ‘Prelude.Maybe’ - is defined in ‘Data.Maybe’ in package ‘base-4.8.0.0’ + is defined in ‘GHC.Base’ in package ‘base-4.8.0.0’ ‘Maybe’ is defined at tcfail182.hs:6:1-18 Relevant bindings include f :: Prelude.Maybe a -> Int (bound at tcfail182.hs:9:1) |