diff options
Diffstat (limited to 'testsuite/tests/ghci')
-rw-r--r-- | testsuite/tests/ghci/scripts/T2182ghci2.stderr | 18 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T5417.stdout | 18 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T8469.stdout | 20 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T9181.stdout | 83 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T9881.stdout | 63 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci008.stdout | 70 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci019.stderr | 10 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci019.stdout | 4 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci023.stdout | 32 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci025.stdout | 226 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/ghci027.stdout | 14 |
11 files changed, 262 insertions, 296 deletions
diff --git a/testsuite/tests/ghci/scripts/T2182ghci2.stderr b/testsuite/tests/ghci/scripts/T2182ghci2.stderr index 0a7f61959d..f850e1d7b4 100644 --- a/testsuite/tests/ghci/scripts/T2182ghci2.stderr +++ b/testsuite/tests/ghci/scripts/T2182ghci2.stderr @@ -1,10 +1,8 @@ - -<interactive>:8:1: - No instance for (GHC.Show.Show Float) - arising from a use of ‘System.IO.print’ - In a stmt of an interactive GHCi command: System.IO.print it - -<interactive>:16:1: - No instance for (GHC.Show.Show Float) - arising from a use of ‘System.IO.print’ - In a stmt of an interactive GHCi command: System.IO.print it +
+<interactive>:8:1:
+ No instance for (Show Float) arising from a use of ‘print’
+ In a stmt of an interactive GHCi command: print it
+
+<interactive>:16:1:
+ No instance for (Show Float) arising from a use of ‘print’
+ In a stmt of an interactive GHCi command: print it
diff --git a/testsuite/tests/ghci/scripts/T5417.stdout b/testsuite/tests/ghci/scripts/T5417.stdout index 1085a1750f..2640c4e04c 100644 --- a/testsuite/tests/ghci/scripts/T5417.stdout +++ b/testsuite/tests/ghci/scripts/T5417.stdout @@ -1,9 +1,9 @@ -data B1 a = B1 a -data instance C.F (B1 a) = B2 a -type role D nominal -data family D a -class C.C1 a where - type role C.F nominal - data family C.F a - -- Defined at T5417a.hs:5:5 -data instance C.F (B1 a) = B2 a -- Defined at T5417.hs:8:10 +data B1 a = B1 a
+data instance C.F (B1 a) = B2 a
+type role D nominal
+data family D a
+class C.C1 a where
+ type role C.F nominal
+ data family C.F a
+ -- Defined at T5417a.hs:5:5
+data instance C.F (B1 a) = B2 a -- Defined at T5417.hs:8:10
diff --git a/testsuite/tests/ghci/scripts/T8469.stdout b/testsuite/tests/ghci/scripts/T8469.stdout index cd7966ee66..c052868ebb 100644 --- a/testsuite/tests/ghci/scripts/T8469.stdout +++ b/testsuite/tests/ghci/scripts/T8469.stdout @@ -1,10 +1,10 @@ -data Int = GHC.Types.I# GHC.Prim.Int# -- Defined in ‘GHC.Types’ -instance Bounded Int -- Defined in ‘GHC.Enum’ -instance Enum Int -- Defined in ‘GHC.Enum’ -instance Eq Int -- Defined in ‘GHC.Classes’ -instance Integral Int -- Defined in ‘GHC.Real’ -instance Num Int -- Defined in ‘GHC.Num’ -instance Ord Int -- Defined in ‘GHC.Classes’ -instance Read Int -- Defined in ‘GHC.Read’ -instance Real Int -- Defined in ‘GHC.Real’ -instance Show Int -- Defined in ‘GHC.Show’ +data Int = I# Int# -- Defined in ‘GHC.Types’
+instance Bounded Int -- Defined in ‘GHC.Enum’
+instance Enum Int -- Defined in ‘GHC.Enum’
+instance Eq Int -- Defined in ‘GHC.Classes’
+instance Integral Int -- Defined in ‘GHC.Real’
+instance Num Int -- Defined in ‘GHC.Num’
+instance Ord Int -- Defined in ‘GHC.Classes’
+instance Read Int -- Defined in ‘GHC.Read’
+instance Real Int -- Defined in ‘GHC.Real’
+instance Show Int -- Defined in ‘GHC.Show’
diff --git a/testsuite/tests/ghci/scripts/T9181.stdout b/testsuite/tests/ghci/scripts/T9181.stdout index e1ac00cc83..6b67785d0b 100644 --- a/testsuite/tests/ghci/scripts/T9181.stdout +++ b/testsuite/tests/ghci/scripts/T9181.stdout @@ -1,54 +1,29 @@ -type family (GHC.TypeLits.*) (a :: GHC.TypeLits.Nat) - (b :: GHC.TypeLits.Nat) :: - GHC.TypeLits.Nat -type family (GHC.TypeLits.+) (a :: GHC.TypeLits.Nat) - (b :: GHC.TypeLits.Nat) :: - GHC.TypeLits.Nat -type family (GHC.TypeLits.-) (a :: GHC.TypeLits.Nat) - (b :: GHC.TypeLits.Nat) :: - GHC.TypeLits.Nat -type (GHC.TypeLits.<=) (x :: GHC.TypeLits.Nat) - (y :: GHC.TypeLits.Nat) = - (x GHC.TypeLits.<=? y) ~ 'True -type family (GHC.TypeLits.<=?) (a :: GHC.TypeLits.Nat) - (b :: GHC.TypeLits.Nat) :: - Bool -type family GHC.TypeLits.CmpNat (a :: GHC.TypeLits.Nat) - (b :: GHC.TypeLits.Nat) :: - Ordering -type family GHC.TypeLits.CmpSymbol (a :: GHC.TypeLits.Symbol) - (b :: GHC.TypeLits.Symbol) :: - Ordering -class GHC.TypeLits.KnownNat (n :: GHC.TypeLits.Nat) where - GHC.TypeLits.natSing :: GHC.TypeLits.SNat n -class GHC.TypeLits.KnownSymbol (n :: GHC.TypeLits.Symbol) where - GHC.TypeLits.symbolSing :: GHC.TypeLits.SSymbol n -data GHC.TypeLits.Nat -data GHC.TypeLits.SomeNat where - GHC.TypeLits.SomeNat :: GHC.TypeLits.KnownNat n => - (Data.Proxy.Proxy n) -> GHC.TypeLits.SomeNat -data GHC.TypeLits.SomeSymbol where - GHC.TypeLits.SomeSymbol :: GHC.TypeLits.KnownSymbol n => - (Data.Proxy.Proxy n) -> GHC.TypeLits.SomeSymbol -data GHC.TypeLits.Symbol -type family (GHC.TypeLits.^) (a :: GHC.TypeLits.Nat) - (b :: GHC.TypeLits.Nat) :: - GHC.TypeLits.Nat -GHC.TypeLits.natVal :: - GHC.TypeLits.KnownNat n => proxy n -> Integer -GHC.TypeLits.natVal' :: - GHC.TypeLits.KnownNat n => GHC.Prim.Proxy# n -> Integer -GHC.TypeLits.sameNat :: - (GHC.TypeLits.KnownNat a, GHC.TypeLits.KnownNat b) => - Data.Proxy.Proxy a - -> Data.Proxy.Proxy b -> Maybe (a Data.Type.Equality.:~: b) -GHC.TypeLits.sameSymbol :: - (GHC.TypeLits.KnownSymbol a, GHC.TypeLits.KnownSymbol b) => - Data.Proxy.Proxy a - -> Data.Proxy.Proxy b -> Maybe (a Data.Type.Equality.:~: b) -GHC.TypeLits.someNatVal :: Integer -> Maybe GHC.TypeLits.SomeNat -GHC.TypeLits.someSymbolVal :: String -> GHC.TypeLits.SomeSymbol -GHC.TypeLits.symbolVal :: - GHC.TypeLits.KnownSymbol n => proxy n -> String -GHC.TypeLits.symbolVal' :: - GHC.TypeLits.KnownSymbol n => GHC.Prim.Proxy# n -> String +type family (*) (a :: Nat) (b :: Nat) :: Nat
+type family (+) (a :: Nat) (b :: Nat) :: Nat
+type family (-) (a :: Nat) (b :: Nat) :: Nat
+type (<=) (x :: Nat) (y :: Nat) = (x <=? y) ~ 'True
+type family (<=?) (a :: Nat) (b :: Nat) :: Bool
+type family CmpNat (a :: Nat) (b :: Nat) :: Ordering
+type family CmpSymbol (a :: Symbol) (b :: Symbol) :: Ordering
+class KnownNat (n :: Nat) where
+ natSing :: SNat n
+class KnownSymbol (n :: Symbol) where
+ symbolSing :: SSymbol n
+data Nat
+data SomeNat where
+ SomeNat :: KnownNat n => (Proxy n) -> SomeNat
+data SomeSymbol where
+ SomeSymbol :: KnownSymbol n => (Proxy n) -> SomeSymbol
+data Symbol
+type family (^) (a :: Nat) (b :: Nat) :: Nat
+natVal :: KnownNat n => proxy n -> Integer
+natVal' :: KnownNat n => Proxy# n -> Integer
+sameNat ::
+ (KnownNat a, KnownNat b) => Proxy a -> Proxy b -> Maybe (a :~: b)
+sameSymbol ::
+ (KnownSymbol a, KnownSymbol b) =>
+ Proxy a -> Proxy b -> Maybe (a :~: b)
+someNatVal :: Integer -> Maybe SomeNat
+someSymbolVal :: String -> SomeSymbol
+symbolVal :: KnownSymbol n => proxy n -> String
+symbolVal' :: KnownSymbol n => Proxy# n -> String
diff --git a/testsuite/tests/ghci/scripts/T9881.stdout b/testsuite/tests/ghci/scripts/T9881.stdout index 6866a6a79c..1fa697f102 100644 --- a/testsuite/tests/ghci/scripts/T9881.stdout +++ b/testsuite/tests/ghci/scripts/T9881.stdout @@ -1,32 +1,31 @@ -data Data.ByteString.Lazy.ByteString - = Data.ByteString.Lazy.Internal.Empty - | Data.ByteString.Lazy.Internal.Chunk {-# UNPACK #-}Data.ByteString.ByteString - Data.ByteString.Lazy.ByteString - -- Defined in ‘Data.ByteString.Lazy.Internal’ -instance Eq Data.ByteString.Lazy.ByteString - -- Defined in ‘Data.ByteString.Lazy.Internal’ -instance Ord Data.ByteString.Lazy.ByteString - -- Defined in ‘Data.ByteString.Lazy.Internal’ -instance Read Data.ByteString.Lazy.ByteString - -- Defined in ‘Data.ByteString.Lazy.Internal’ -instance Show Data.ByteString.Lazy.ByteString - -- Defined in ‘Data.ByteString.Lazy.Internal’ -instance Monoid Data.ByteString.Lazy.ByteString - -- Defined in ‘Data.ByteString.Lazy.Internal’ - -data Data.ByteString.ByteString - = Data.ByteString.Internal.PS {-# UNPACK #-}(GHC.ForeignPtr.ForeignPtr - GHC.Word.Word8) - {-# UNPACK #-}Int - {-# UNPACK #-}Int - -- Defined in ‘Data.ByteString.Internal’ -instance Eq Data.ByteString.ByteString - -- Defined in ‘Data.ByteString.Internal’ -instance Ord Data.ByteString.ByteString - -- Defined in ‘Data.ByteString.Internal’ -instance Read Data.ByteString.ByteString - -- Defined in ‘Data.ByteString.Internal’ -instance Show Data.ByteString.ByteString - -- Defined in ‘Data.ByteString.Internal’ -instance Monoid Data.ByteString.ByteString - -- Defined in ‘Data.ByteString.Internal’ +data Data.ByteString.Lazy.ByteString
+ = Data.ByteString.Lazy.Internal.Empty
+ | Data.ByteString.Lazy.Internal.Chunk {-# UNPACK #-}Data.ByteString.ByteString
+ Data.ByteString.Lazy.ByteString
+ -- Defined in ‘Data.ByteString.Lazy.Internal’
+instance Eq Data.ByteString.Lazy.ByteString
+ -- Defined in ‘Data.ByteString.Lazy.Internal’
+instance Ord Data.ByteString.Lazy.ByteString
+ -- Defined in ‘Data.ByteString.Lazy.Internal’
+instance Read Data.ByteString.Lazy.ByteString
+ -- Defined in ‘Data.ByteString.Lazy.Internal’
+instance Show Data.ByteString.Lazy.ByteString
+ -- Defined in ‘Data.ByteString.Lazy.Internal’
+instance Monoid Data.ByteString.Lazy.ByteString
+ -- Defined in ‘Data.ByteString.Lazy.Internal’
+
+data Data.ByteString.ByteString
+ = Data.ByteString.Internal.PS {-# UNPACK #-}(ForeignPtr Word8)
+ {-# UNPACK #-}Int
+ {-# UNPACK #-}Int
+ -- Defined in ‘Data.ByteString.Internal’
+instance Eq Data.ByteString.ByteString
+ -- Defined in ‘Data.ByteString.Internal’
+instance Ord Data.ByteString.ByteString
+ -- Defined in ‘Data.ByteString.Internal’
+instance Read Data.ByteString.ByteString
+ -- Defined in ‘Data.ByteString.Internal’
+instance Show Data.ByteString.ByteString
+ -- Defined in ‘Data.ByteString.Internal’
+instance Monoid Data.ByteString.ByteString
+ -- Defined in ‘Data.ByteString.Internal’
diff --git a/testsuite/tests/ghci/scripts/ghci008.stdout b/testsuite/tests/ghci/scripts/ghci008.stdout index 8aec1602a6..0f9c93a4a9 100644 --- a/testsuite/tests/ghci/scripts/ghci008.stdout +++ b/testsuite/tests/ghci/scripts/ghci008.stdout @@ -1,36 +1,34 @@ -class Num a where - (+) :: a -> a -> a - ... - -- Defined in ‘GHC.Num’ -infixl 6 + -class Num a where - (+) :: a -> a -> a - ... - -- Defined in ‘GHC.Num’ -infixl 6 + -data Data.Complex.Complex a = !a Data.Complex.:+ !a - -- Defined in ‘Data.Complex’ -infix 6 Data.Complex.:+ -data Data.Complex.Complex a = !a Data.Complex.:+ !a - -- Defined in ‘Data.Complex’ -infix 6 Data.Complex.:+ -class (RealFrac a, Floating a) => RealFloat a where - floatRadix :: a -> Integer - floatDigits :: a -> Int - floatRange :: a -> (Int, Int) - decodeFloat :: a -> (Integer, Int) - encodeFloat :: Integer -> Int -> a - exponent :: a -> Int - significand :: a -> a - scaleFloat :: Int -> a -> a - isNaN :: a -> Bool - isInfinite :: a -> Bool - isDenormalized :: a -> Bool - isNegativeZero :: a -> Bool - isIEEE :: a -> Bool - atan2 :: a -> a -> a - -- Defined in ‘GHC.Float’ -instance RealFloat Float -- Defined in ‘GHC.Float’ -instance RealFloat Double -- Defined in ‘GHC.Float’ -base-4.8.1.0:Data.OldList.isPrefixOf :: Eq a => [a] -> [a] -> Bool - -- Defined in ‘base-4.8.1.0:Data.OldList’ +class Num a where
+ (+) :: a -> a -> a
+ ...
+ -- Defined in ‘GHC.Num’
+infixl 6 +
+class Num a where
+ (+) :: a -> a -> a
+ ...
+ -- Defined in ‘GHC.Num’
+infixl 6 +
+data Complex a = !a :+ !a -- Defined in ‘Data.Complex’
+infix 6 :+
+data Complex a = !a :+ !a -- Defined in ‘Data.Complex’
+infix 6 :+
+class (RealFrac a, Floating a) => RealFloat a where
+ floatRadix :: a -> Integer
+ floatDigits :: a -> Int
+ floatRange :: a -> (Int, Int)
+ decodeFloat :: a -> (Integer, Int)
+ encodeFloat :: Integer -> Int -> a
+ exponent :: a -> Int
+ significand :: a -> a
+ scaleFloat :: Int -> a -> a
+ isNaN :: a -> Bool
+ isInfinite :: a -> Bool
+ isDenormalized :: a -> Bool
+ isNegativeZero :: a -> Bool
+ isIEEE :: a -> Bool
+ atan2 :: a -> a -> a
+ -- Defined in ‘GHC.Float’
+instance RealFloat Float -- Defined in ‘GHC.Float’
+instance RealFloat Double -- Defined in ‘GHC.Float’
+isPrefixOf :: Eq a => [a] -> [a] -> Bool
+ -- Defined in ‘base-4.8.1.0:Data.OldList’
diff --git a/testsuite/tests/ghci/scripts/ghci019.stderr b/testsuite/tests/ghci/scripts/ghci019.stderr index de8c7f0901..10f6a54bfe 100644 --- a/testsuite/tests/ghci/scripts/ghci019.stderr +++ b/testsuite/tests/ghci/scripts/ghci019.stderr @@ -1,5 +1,5 @@ - -ghci019.hs:9:10: Warning: - No explicit implementation for - either ‘Prelude.==’ or ‘Prelude./=’ - In the instance declaration for ‘Prelude.Eq Foo’ +
+ghci019.hs:9:10: Warning:
+ No explicit implementation for
+ either ‘==’ or ‘/=’
+ In the instance declaration for ‘Eq Foo’
diff --git a/testsuite/tests/ghci/scripts/ghci019.stdout b/testsuite/tests/ghci/scripts/ghci019.stdout index 4f346e70b5..85b5e02157 100644 --- a/testsuite/tests/ghci/scripts/ghci019.stdout +++ b/testsuite/tests/ghci/scripts/ghci019.stdout @@ -1,2 +1,2 @@ -data Foo = Foo -- Defined at ghci019.hs:8:1 -instance Prelude.Eq Foo -- Defined at ghci019.hs:9:10 +data Foo = Foo -- Defined at ghci019.hs:8:1
+instance Eq Foo -- Defined at ghci019.hs:9:10
diff --git a/testsuite/tests/ghci/scripts/ghci023.stdout b/testsuite/tests/ghci/scripts/ghci023.stdout index 51c1b9196a..010fe50878 100644 --- a/testsuite/tests/ghci/scripts/ghci023.stdout +++ b/testsuite/tests/ghci/scripts/ghci023.stdout @@ -1,16 +1,16 @@ --- testing ghci multiline commands :{ .. :} --- via stdin -(1,2,3) -Data.Maybe.catMaybes :: [Maybe a] -> [a] -Data.Maybe.fromJust :: Maybe a -> a -Data.Maybe.fromMaybe :: a -> Maybe a -> a -Data.Maybe.isJust :: Maybe a -> Bool -Data.Maybe.isNothing :: Maybe a -> Bool -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 +-- testing ghci multiline commands :{ .. :}
+-- via stdin
+(1,2,3)
+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
+-- via readFile
+(True,False)
+id :: a -> a
diff --git a/testsuite/tests/ghci/scripts/ghci025.stdout b/testsuite/tests/ghci/scripts/ghci025.stdout index 532a3347cc..e5b5bc34b7 100644 --- a/testsuite/tests/ghci/scripts/ghci025.stdout +++ b/testsuite/tests/ghci/scripts/ghci025.stdout @@ -1,114 +1,112 @@ --- test :browse! functionality -:browse! *T --- defined locally -T.length :: T.Integer -class N a -class S a -class C a b where - c1 :: N b => a -> b - c2 :: (N b, S b) => a -> b - c3 :: a1 -> b - c4 :: a1 -> b -c1 :: (C a b, N b) => a -> b -c2 :: (C a b, N b, S b) => a -> b -c3 :: C a b => forall a. a -> b -c4 :: C a b => forall a1. a1 -> b --- imported via Control.Monad -class (GHC.Base.Alternative m, Monad m) => - MonadPlus (m :: * -> *) where - mzero :: m a - mplus :: m a -> m a -> m a -mplus :: MonadPlus m => forall a. m a -> m a -> m a -mzero :: MonadPlus m => forall a. m a --- imported via Control.Monad, Prelude -(>>) :: Monad m => forall a b. m a -> m b -> m b -(>>=) :: Monad m => forall a b. m a -> (a -> m b) -> m b -fail :: Monad m => forall a. GHC.Base.String -> m a -return :: Monad m => forall a. a -> m a --- imported via Control.Monad, Prelude, T -class GHC.Base.Applicative m => Monad (m :: * -> *) where - (>>=) :: m a -> (a -> m b) -> m b - (>>) :: m a -> m b -> m b - return :: a -> m a - fail :: GHC.Base.String -> m a --- imported via Data.Maybe -catMaybes :: [Maybe a] -> [a] -fromJust :: Maybe a -> a -fromMaybe :: a -> Maybe a -> a -isJust :: Maybe a -> GHC.Types.Bool -isNothing :: Maybe a -> GHC.Types.Bool -listToMaybe :: [a] -> Maybe a -mapMaybe :: (a -> Maybe b) -> [a] -> [b] -maybe :: b -> (a -> b) -> Maybe a -> b -maybeToList :: Maybe a -> [a] --- imported via Data.Maybe, Prelude -Just :: a -> Maybe a -data Maybe a = Nothing | Just a -Nothing :: Maybe a --- imported via Prelude -(+) :: GHC.Num.Num a => a -> a -> a -(=<<) :: Monad m => (a -> m b) -> m a -> m b -class Eq a where - (GHC.Classes.==) :: a -> a -> GHC.Types.Bool - (GHC.Classes./=) :: a -> a -> GHC.Types.Bool --- imported via Prelude, T -Prelude.length :: - Data.Foldable.Foldable t => forall a. t a -> GHC.Types.Int --- imported via T -data T.Integer - = integer-gmp-1.0.0.0:GHC.Integer.Type.S# !GHC.Prim.Int# - | integer-gmp-1.0.0.0:GHC.Integer.Type.Jp# {-# UNPACK #-}integer-gmp-1.0.0.0:GHC.Integer.Type.BigNat - | integer-gmp-1.0.0.0:GHC.Integer.Type.Jn# {-# UNPACK #-}integer-gmp-1.0.0.0:GHC.Integer.Type.BigNat -T.length :: Data.ByteString.Internal.ByteString -> GHC.Types.Int -:browse! T --- defined locally -T.length :: T.Integer -class N a -class S a -class C a b where - c1 :: N b => a -> b - c2 :: (N b, S b) => a -> b - c3 :: a1 -> b - c4 :: a1 -> b -c1 :: (C a b, N b) => a -> b -c2 :: (C a b, N b, S b) => a -> b -c3 :: C a b => forall a. a -> b -c4 :: C a b => forall a1. a1 -> b -:browse! T -- with -fprint-explicit-foralls --- defined locally -T.length :: T.Integer -class N a -class S a -class C a b where - c1 :: N b => a -> b - c2 :: (N b, S b) => a -> b - c3 :: forall a1. a1 -> b - c4 :: forall a1. a1 -> b -c1 :: forall a b. (C a b, N b) => a -> b -c2 :: forall a b. (C a b, N b, S b) => a -> b -c3 :: forall a b. C a b => forall a. a -> b -c4 :: forall a b. C a b => forall a1. a1 -> b --- test :browse! <target> relative to different contexts -:browse! Ghci025C -- from *Ghci025C> --- defined locally -g :: forall a. Num a => a -> a -h :: forall a. Integral a => a -> a --- imported via Ghci025D -f :: forall a. Num a => a -> a -:browse! Ghci025C -- from *Ghci025B>, after :add Ghci025B --- imported via Ghci025C -g :: forall a. Num a => a -> a -h :: forall a. Integral a => a -> a -f :: forall a. Num a => a -> a -:browse! Ghci025C -- from *Ghci025C>, after :m *Ghci025C --- defined locally -g :: forall a. Num a => a -> a -h :: forall a. Integral a => a -> a --- imported via Ghci025D -f :: forall a. Num a => a -> a -:browse! Ghci025C -- from *Ghci025D>, after :m *Ghci025D --- not currently imported -Ghci025C.g :: forall a. Num a => a -> a -Ghci025C.h :: forall a. Integral a => a -> a --- defined locally -f :: forall a. Num a => a -> a +-- test :browse! functionality
+:browse! *T
+-- defined locally
+T.length :: T.Integer
+class N a
+class S a
+class C a b where
+ c1 :: N b => a -> b
+ c2 :: (N b, S b) => a -> b
+ c3 :: a1 -> b
+ c4 :: a1 -> b
+c1 :: (C a b, N b) => a -> b
+c2 :: (C a b, N b, S b) => a -> b
+c3 :: C a b => forall a. a -> b
+c4 :: C a b => forall a1. a1 -> b
+-- imported via Control.Monad
+class (Alternative m, Monad m) => MonadPlus (m :: * -> *) where
+ mzero :: m a
+ mplus :: m a -> m a -> m a
+mplus :: MonadPlus m => forall a. m a -> m a -> m a
+mzero :: MonadPlus m => forall a. m a
+-- imported via Control.Monad, Prelude
+(>>) :: Monad m => forall a b. m a -> m b -> m b
+(>>=) :: Monad m => forall a b. m a -> (a -> m b) -> m b
+fail :: Monad m => forall a. String -> m a
+return :: Monad m => forall a. a -> m a
+-- imported via Control.Monad, Prelude, T
+class Applicative m => Monad (m :: * -> *) where
+ (>>=) :: m a -> (a -> m b) -> m b
+ (>>) :: m a -> m b -> m b
+ return :: a -> m a
+ fail :: String -> m a
+-- imported via Data.Maybe
+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]
+-- imported via Data.Maybe, Prelude
+Just :: a -> Maybe a
+data Maybe a = Nothing | Just a
+Nothing :: Maybe a
+-- imported via Prelude
+(+) :: Num a => a -> a -> a
+(=<<) :: Monad m => (a -> m b) -> m a -> m b
+class Eq a where
+ (==) :: a -> a -> Bool
+ (/=) :: a -> a -> Bool
+-- imported via Prelude, T
+Prelude.length :: Foldable t => forall a. t a -> Int
+-- imported via T
+data T.Integer
+ = integer-gmp-1.0.0.0:GHC.Integer.Type.S# !Int#
+ | integer-gmp-1.0.0.0:GHC.Integer.Type.Jp# {-# UNPACK #-}integer-gmp-1.0.0.0:GHC.Integer.Type.BigNat
+ | integer-gmp-1.0.0.0:GHC.Integer.Type.Jn# {-# UNPACK #-}integer-gmp-1.0.0.0:GHC.Integer.Type.BigNat
+T.length :: Data.ByteString.Internal.ByteString -> Int
+:browse! T
+-- defined locally
+T.length :: T.Integer
+class N a
+class S a
+class C a b where
+ c1 :: N b => a -> b
+ c2 :: (N b, S b) => a -> b
+ c3 :: a1 -> b
+ c4 :: a1 -> b
+c1 :: (C a b, N b) => a -> b
+c2 :: (C a b, N b, S b) => a -> b
+c3 :: C a b => forall a. a -> b
+c4 :: C a b => forall a1. a1 -> b
+:browse! T -- with -fprint-explicit-foralls
+-- defined locally
+T.length :: T.Integer
+class N a
+class S a
+class C a b where
+ c1 :: N b => a -> b
+ c2 :: (N b, S b) => a -> b
+ c3 :: forall a1. a1 -> b
+ c4 :: forall a1. a1 -> b
+c1 :: forall a b. (C a b, N b) => a -> b
+c2 :: forall a b. (C a b, N b, S b) => a -> b
+c3 :: forall a b. C a b => forall a. a -> b
+c4 :: forall a b. C a b => forall a1. a1 -> b
+-- test :browse! <target> relative to different contexts
+:browse! Ghci025C -- from *Ghci025C>
+-- defined locally
+g :: forall a. Num a => a -> a
+h :: forall a. Integral a => a -> a
+-- imported via Ghci025D
+f :: forall a. Num a => a -> a
+:browse! Ghci025C -- from *Ghci025B>, after :add Ghci025B
+-- imported via Ghci025C
+g :: forall a. Num a => a -> a
+h :: forall a. Integral a => a -> a
+f :: forall a. Num a => a -> a
+:browse! Ghci025C -- from *Ghci025C>, after :m *Ghci025C
+-- defined locally
+g :: forall a. Num a => a -> a
+h :: forall a. Integral a => a -> a
+-- imported via Ghci025D
+f :: forall a. Num a => a -> a
+:browse! Ghci025C -- from *Ghci025D>, after :m *Ghci025D
+-- not currently imported
+Ghci025C.g :: forall a. Num a => a -> a
+Ghci025C.h :: forall a. Integral a => a -> a
+-- defined locally
+f :: forall a. Num a => a -> a
diff --git a/testsuite/tests/ghci/scripts/ghci027.stdout b/testsuite/tests/ghci/scripts/ghci027.stdout index bbe355c17a..33b138d2da 100644 --- a/testsuite/tests/ghci/scripts/ghci027.stdout +++ b/testsuite/tests/ghci/scripts/ghci027.stdout @@ -1,8 +1,6 @@ -class (GHC.Base.Alternative m, GHC.Base.Monad m) => - GHC.Base.MonadPlus (m :: * -> *) where - ... - mplus :: m a -> m a -> m a -class (GHC.Base.Alternative m, GHC.Base.Monad m) => - GHC.Base.MonadPlus (m :: * -> *) where - ... - Control.Monad.mplus :: m a -> m a -> m a +class (Alternative m, Monad m) => MonadPlus (m :: * -> *) where
+ ...
+ mplus :: m a -> m a -> m a
+class (Alternative m, Monad m) => MonadPlus (m :: * -> *) where
+ ...
+ mplus :: m a -> m a -> m a
|