summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/scripts
diff options
context:
space:
mode:
authorKavon Farvardin <kavon@farvard.in>2018-09-23 15:29:37 -0500
committerKavon Farvardin <kavon@farvard.in>2018-09-23 15:29:37 -0500
commit84c2ad99582391005b5e873198b15e9e9eb4f78d (patch)
treecaa8c2f2ec7e97fbb4977263c6817c9af5025cf4 /testsuite/tests/ghci/scripts
parent8ddb47cfcf5776e9a3c55fd37947c8a95e00fa12 (diff)
parente68b439fe5de61b9a2ca51af472185c62ccb8b46 (diff)
downloadhaskell-wip/T13904.tar.gz
update to current master againwip/T13904
Diffstat (limited to 'testsuite/tests/ghci/scripts')
-rw-r--r--testsuite/tests/ghci/scripts/Defer02.stderr36
-rw-r--r--testsuite/tests/ghci/scripts/Makefile5
-rw-r--r--testsuite/tests/ghci/scripts/T10059.script5
-rw-r--r--testsuite/tests/ghci/scripts/T10059.stdout4
-rw-r--r--testsuite/tests/ghci/scripts/T10248.stderr6
-rw-r--r--testsuite/tests/ghci/scripts/T10249.stderr3
-rw-r--r--testsuite/tests/ghci/scripts/T10321.hs3
-rw-r--r--testsuite/tests/ghci/scripts/T10963.script4
-rw-r--r--testsuite/tests/ghci/scripts/T10963.stderr2
-rw-r--r--testsuite/tests/ghci/scripts/T10963.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/T11252.script2
-rw-r--r--testsuite/tests/ghci/scripts/T11252.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/T11376.script2
-rw-r--r--testsuite/tests/ghci/scripts/T11524a.stdout37
-rw-r--r--testsuite/tests/ghci/scripts/T11547.script9
-rw-r--r--testsuite/tests/ghci/scripts/T11547.stdout5
-rw-r--r--testsuite/tests/ghci/scripts/T11721.script7
-rw-r--r--testsuite/tests/ghci/scripts/T11721.stdout3
-rw-r--r--testsuite/tests/ghci/scripts/T11975.stdout14
-rw-r--r--testsuite/tests/ghci/scripts/T12023.script1
-rw-r--r--testsuite/tests/ghci/scripts/T12023.stdout1
-rw-r--r--testsuite/tests/ghci/scripts/T12158.script2
-rw-r--r--testsuite/tests/ghci/scripts/T12447.stdout4
-rw-r--r--testsuite/tests/ghci/scripts/T12550.script2
-rw-r--r--testsuite/tests/ghci/scripts/T12550.stdout6
-rw-r--r--testsuite/tests/ghci/scripts/T13407.script4
-rw-r--r--testsuite/tests/ghci/scripts/T13407.stdout3
-rw-r--r--testsuite/tests/ghci/scripts/T13963.script13
-rw-r--r--testsuite/tests/ghci/scripts/T13963.stdout8
-rw-r--r--testsuite/tests/ghci/scripts/T13988.hs8
-rw-r--r--testsuite/tests/ghci/scripts/T13988.script2
-rw-r--r--testsuite/tests/ghci/scripts/T13988.stdout1
-rw-r--r--testsuite/tests/ghci/scripts/T14342.script0
-rw-r--r--testsuite/tests/ghci/scripts/T14676.script7
-rw-r--r--testsuite/tests/ghci/scripts/T14676.stdout3
-rw-r--r--testsuite/tests/ghci/scripts/T14796.script3
-rw-r--r--testsuite/tests/ghci/scripts/T14796.stdout1
-rw-r--r--testsuite/tests/ghci/scripts/T14969.script1
-rw-r--r--testsuite/tests/ghci/scripts/T14969.stderr7
-rw-r--r--testsuite/tests/ghci/scripts/T15259.script3
-rw-r--r--testsuite/tests/ghci/scripts/T15259.stderr2
-rw-r--r--testsuite/tests/ghci/scripts/T15325.hs11
-rw-r--r--testsuite/tests/ghci/scripts/T15325.script2
-rw-r--r--testsuite/tests/ghci/scripts/T15325.stderr25
-rw-r--r--testsuite/tests/ghci/scripts/T15341.hs6
-rw-r--r--testsuite/tests/ghci/scripts/T15341.script4
-rw-r--r--testsuite/tests/ghci/scripts/T15341.stdout6
-rw-r--r--testsuite/tests/ghci/scripts/T15568.hs7
-rw-r--r--testsuite/tests/ghci/scripts/T15568.script4
-rw-r--r--testsuite/tests/ghci/scripts/T15568.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/T1914.stdout6
-rw-r--r--testsuite/tests/ghci/scripts/T2976.stdout2
-rw-r--r--testsuite/tests/ghci/scripts/T4175.stdout11
-rw-r--r--testsuite/tests/ghci/scripts/T6105.stdout4
-rw-r--r--testsuite/tests/ghci/scripts/T7627.stdout10
-rw-r--r--testsuite/tests/ghci/scripts/T7730.stdout3
-rw-r--r--testsuite/tests/ghci/scripts/T7873.script2
-rw-r--r--testsuite/tests/ghci/scripts/T7873.stderr10
-rw-r--r--testsuite/tests/ghci/scripts/T7873.stdout4
-rw-r--r--testsuite/tests/ghci/scripts/T7939.hs4
-rw-r--r--testsuite/tests/ghci/scripts/T7939.stdout8
-rw-r--r--testsuite/tests/ghci/scripts/T8353.stderr60
-rw-r--r--testsuite/tests/ghci/scripts/T8357.hs7
-rw-r--r--testsuite/tests/ghci/scripts/T8535.stdout3
-rw-r--r--testsuite/tests/ghci/scripts/T9181.stdout37
-rw-r--r--testsuite/tests/ghci/scripts/T9293.stderr6
-rw-r--r--testsuite/tests/ghci/scripts/T9293.stdout12
-rw-r--r--testsuite/tests/ghci/scripts/T9293.stdout-mingw3270
-rw-r--r--testsuite/tests/ghci/scripts/T9881.stdout4
-rwxr-xr-xtestsuite/tests/ghci/scripts/all.T43
-rw-r--r--testsuite/tests/ghci/scripts/ghci008.stdout4
-rw-r--r--testsuite/tests/ghci/scripts/ghci011.stdout4
-rw-r--r--testsuite/tests/ghci/scripts/ghci020.stdout3
-rw-r--r--testsuite/tests/ghci/scripts/ghci024.stdout3
-rw-r--r--testsuite/tests/ghci/scripts/ghci024.stdout-mingw3240
-rw-r--r--testsuite/tests/ghci/scripts/ghci025.stdout28
-rw-r--r--testsuite/tests/ghci/scripts/ghci030.stdout8
-rw-r--r--testsuite/tests/ghci/scripts/ghci057.stderr6
-rw-r--r--testsuite/tests/ghci/scripts/ghci057.stdout12
-rw-r--r--testsuite/tests/ghci/scripts/ghci057.stdout-mingw3270
-rw-r--r--testsuite/tests/ghci/scripts/ghci058.stdout4
81 files changed, 611 insertions, 177 deletions
diff --git a/testsuite/tests/ghci/scripts/Defer02.stderr b/testsuite/tests/ghci/scripts/Defer02.stderr
index 5aa67f06c3..63dbc9b042 100644
--- a/testsuite/tests/ghci/scripts/Defer02.stderr
+++ b/testsuite/tests/ghci/scripts/Defer02.stderr
@@ -12,16 +12,11 @@ Defer01.hs:14:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
• In the expression: 'p'
In an equation for ‘a’: a = 'p'
-Defer01.hs:18:7: warning: [-Wdeferred-type-errors (in -Wdefault)]
- • No instance for (Eq B) arising from a use of ‘==’
- • In the expression: x == x
- In an equation for ‘b’: b x = x == x
-
Defer01.hs:25:1: warning: [-Woverlapping-patterns (in -Wdefault)]
Pattern match has inaccessible right hand side
In an equation for ‘c’: c (C2 x) = ...
-Defer01.hs:25:4: warning: [-Wdeferred-type-errors (in -Wdefault)]
+Defer01.hs:25:4: warning: [-Winaccessible-code (in -Wdefault)]
• Couldn't match type ‘Int’ with ‘Bool’
Inaccessible code in
a pattern with constructor: C2 :: Bool -> C Bool,
@@ -29,12 +24,6 @@ Defer01.hs:25:4: warning: [-Wdeferred-type-errors (in -Wdefault)]
• In the pattern: C2 x
In an equation for ‘c’: c (C2 x) = True
-Defer01.hs:28:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
- • No instance for (Num (a -> a)) arising from the literal ‘1’
- (maybe you haven't applied a function to enough arguments?)
- • In the expression: 1
- In an equation for ‘d’: d = 1
-
Defer01.hs:31:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Couldn't match expected type ‘Char -> t’ with actual type ‘Char’
• The function ‘e’ is applied to one argument,
@@ -59,31 +48,12 @@ Defer01.hs:34:8: warning: [-Wdeferred-type-errors (in -Wdefault)]
Defer01.hs:39:17: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Couldn't match expected type ‘Bool’ with actual type ‘T a’
• In the first argument of ‘not’, namely ‘(K a)’
- In the expression: (not (K a))
+ In the first argument of ‘seq’, namely ‘(not (K a))’
In the expression: seq (not (K a)) ()
• Relevant bindings include
a :: a (bound at Defer01.hs:39:3)
i :: a -> () (bound at Defer01.hs:39:1)
-Defer01.hs:43:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
- • No instance for (MyClass a1) arising from a use of ‘myOp’
- • In the expression: myOp 23
- In an equation for ‘j’: j = myOp 23
-
-Defer01.hs:43:10: warning: [-Wdeferred-type-errors (in -Wdefault)]
- • Ambiguous type variable ‘a1’ arising from the literal ‘23’
- prevents the constraint ‘(Num a1)’ from being solved.
- Probable fix: use a type annotation to specify what ‘a1’ should be.
- These potential instances exist:
- instance Num Integer -- Defined in ‘GHC.Num’
- instance Num Double -- Defined in ‘GHC.Float’
- instance Num Float -- Defined in ‘GHC.Float’
- ...plus two others
- (use -fprint-potential-instances to see them all)
- • In the first argument of ‘myOp’, namely ‘23’
- In the expression: myOp 23
- In an equation for ‘j’: j = myOp 23
-
Defer01.hs:47:7: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Couldn't match expected type ‘Bool’ with actual type ‘Int’
• In the expression: x
@@ -152,7 +122,7 @@ Defer01.hs:50:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
*** Exception: Defer01.hs:39:17: error:
• Couldn't match expected type ‘Bool’ with actual type ‘T a’
• In the first argument of ‘not’, namely ‘(K a)’
- In the expression: (not (K a))
+ In the first argument of ‘seq’, namely ‘(not (K a))’
In the expression: seq (not (K a)) ()
• Relevant bindings include
a :: a (bound at Defer01.hs:39:3)
diff --git a/testsuite/tests/ghci/scripts/Makefile b/testsuite/tests/ghci/scripts/Makefile
index 5f848656c5..40ba561f69 100644
--- a/testsuite/tests/ghci/scripts/Makefile
+++ b/testsuite/tests/ghci/scripts/Makefile
@@ -61,3 +61,8 @@ T11389:
# (without -v0)
'$(TEST_HC)' $(filter-out -v0,$(TEST_HC_OPTS_INTERACTIVE)) \
-ghci-script T11389.script < /dev/null | grep 'configuration'
+
+.PHONY: T12023
+T12023:
+ -'$(TEST_HC)' $(TEST_HC_OPTS_INTERACTIVE) \
+ -ghci-script T12023.script < /dev/null | grep -c -E '(~#|~R#|~P#)'
diff --git a/testsuite/tests/ghci/scripts/T10059.script b/testsuite/tests/ghci/scripts/T10059.script
new file mode 100644
index 0000000000..d352b9f15c
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T10059.script
@@ -0,0 +1,5 @@
+:set -XTypeOperators
+:i (~)
+:k (~)
+:set -fprint-equality-relations
+:i (~)
diff --git a/testsuite/tests/ghci/scripts/T10059.stdout b/testsuite/tests/ghci/scripts/T10059.stdout
new file mode 100644
index 0000000000..92fbb45ef7
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T10059.stdout
@@ -0,0 +1,4 @@
+class (a ~ b) => (~) (a :: k0) (b :: k0) -- Defined in ‘GHC.Types’
+(~) :: k0 -> k0 -> Constraint
+class (a GHC.Prim.~# b) => (~) (a :: k0) (b :: k0)
+ -- Defined in ‘GHC.Types’
diff --git a/testsuite/tests/ghci/scripts/T10248.stderr b/testsuite/tests/ghci/scripts/T10248.stderr
index 9de7323928..b9cf45a8f6 100644
--- a/testsuite/tests/ghci/scripts/T10248.stderr
+++ b/testsuite/tests/ghci/scripts/T10248.stderr
@@ -1,10 +1,7 @@
<interactive>:2:10: error:
• Found hole: _ :: f a
- Where: ‘f’ is a rigid type variable bound by
- the inferred type of it :: Functor f => f (Maybe a)
- at <interactive>:2:1-10
- ‘a’ is a rigid type variable bound by
+ Where: ‘f’, ‘a’ are rigid type variables bound by
the inferred type of it :: Functor f => f (Maybe a)
at <interactive>:2:1-10
• In the second argument of ‘(<$>)’, namely ‘_’
@@ -12,3 +9,4 @@
In an equation for ‘it’: it = Just <$> _
• Relevant bindings include
it :: f (Maybe a) (bound at <interactive>:2:1)
+ Constraints include Functor f (from <interactive>:2:1-10)
diff --git a/testsuite/tests/ghci/scripts/T10249.stderr b/testsuite/tests/ghci/scripts/T10249.stderr
index ade995051e..c8215663a5 100644
--- a/testsuite/tests/ghci/scripts/T10249.stderr
+++ b/testsuite/tests/ghci/scripts/T10249.stderr
@@ -2,7 +2,8 @@
<interactive>:1:1: error:
• Found hole: _ :: t
Where: ‘t’ is a rigid type variable bound by
- the inferred type of it :: t at <interactive>:1:1
+ the inferred type of it :: t
+ at <interactive>:1:1
• In the expression: _
In an equation for ‘it’: it = _
• Relevant bindings include it :: t (bound at <interactive>:1:1)
diff --git a/testsuite/tests/ghci/scripts/T10321.hs b/testsuite/tests/ghci/scripts/T10321.hs
index 44d264a801..443ebe41a4 100644
--- a/testsuite/tests/ghci/scripts/T10321.hs
+++ b/testsuite/tests/ghci/scripts/T10321.hs
@@ -5,9 +5,10 @@
module T10321 where
+import Data.Kind (Type)
import GHC.TypeLits
-data Vec :: Nat -> * -> * where
+data Vec :: Nat -> Type -> Type where
Nil :: Vec 0 a
(:>) :: a -> Vec n a -> Vec (n + 1) a
diff --git a/testsuite/tests/ghci/scripts/T10963.script b/testsuite/tests/ghci/scripts/T10963.script
index 357d1256ba..2bba5b36ef 100644
--- a/testsuite/tests/ghci/scripts/T10963.script
+++ b/testsuite/tests/ghci/scripts/T10963.script
@@ -3,5 +3,7 @@
:t +d length
let foo :: (Num a, Monoid a) => a -> a; foo = undefined
:t +d foo
-instance Monoid Double where mempty = 0; mappend = (+)
+import Data.Semigroup
+instance Semigroup Double where (<>) = (+)
+instance Monoid Double where mempty = 0
:t +d foo
diff --git a/testsuite/tests/ghci/scripts/T10963.stderr b/testsuite/tests/ghci/scripts/T10963.stderr
index e20f792773..2efd138be8 100644
--- a/testsuite/tests/ghci/scripts/T10963.stderr
+++ b/testsuite/tests/ghci/scripts/T10963.stderr
@@ -8,5 +8,5 @@
instance Num Double -- Defined in ‘GHC.Float’
instance Num Float -- Defined in ‘GHC.Float’
...plus two others
- ...plus five instances involving out-of-scope types
+ ...plus 8 instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
diff --git a/testsuite/tests/ghci/scripts/T10963.stdout b/testsuite/tests/ghci/scripts/T10963.stdout
index bf639a8aa5..415c473e47 100644
--- a/testsuite/tests/ghci/scripts/T10963.stdout
+++ b/testsuite/tests/ghci/scripts/T10963.stdout
@@ -1,4 +1,4 @@
-mapM :: (Monad m, Traversable t) => (a -> m b) -> t a -> m (t b)
+mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)
mapM :: Monad m => (a -> m b) -> [a] -> m [b]
length :: [a] -> Int
foo :: Double -> Double
diff --git a/testsuite/tests/ghci/scripts/T11252.script b/testsuite/tests/ghci/scripts/T11252.script
index 485cd8fa0d..3cec1d348d 100644
--- a/testsuite/tests/ghci/scripts/T11252.script
+++ b/testsuite/tests/ghci/scripts/T11252.script
@@ -1,3 +1,3 @@
-:set -XTypeInType
+:set -XPolyKinds
data Proxy1 k (a :: k) = Proxy1
:kind Proxy1
diff --git a/testsuite/tests/ghci/scripts/T11252.stdout b/testsuite/tests/ghci/scripts/T11252.stdout
index f6d45ddf32..eddba4530e 100644
--- a/testsuite/tests/ghci/scripts/T11252.stdout
+++ b/testsuite/tests/ghci/scripts/T11252.stdout
@@ -1 +1 @@
-Proxy1 :: k -> *
+Proxy1 :: forall k -> k -> *
diff --git a/testsuite/tests/ghci/scripts/T11376.script b/testsuite/tests/ghci/scripts/T11376.script
index d359b66542..0cda4f02ba 100644
--- a/testsuite/tests/ghci/scripts/T11376.script
+++ b/testsuite/tests/ghci/scripts/T11376.script
@@ -3,7 +3,7 @@ let { bar :: Show a => a -> b -> a; bar = error "urk" }
:type bar @Int
:set -fprint-explicit-foralls
:type bar @Int
-:set -fprint-explicit-kinds -XTypeApplications -XTypeInType
+:set -fprint-explicit-kinds -XTypeApplications -XPolyKinds
data Prox a = Prox
let { prox :: Prox a; prox = Prox }
:t prox
diff --git a/testsuite/tests/ghci/scripts/T11524a.stdout b/testsuite/tests/ghci/scripts/T11524a.stdout
index 007d2ae097..ea91ef9cd1 100644
--- a/testsuite/tests/ghci/scripts/T11524a.stdout
+++ b/testsuite/tests/ghci/scripts/T11524a.stdout
@@ -4,15 +4,15 @@ pattern P :: Bool -- Defined at <interactive>:16:1
pattern Pe :: a -> Ex -- Defined at <interactive>:17:1
pattern Pu :: p -> p -- Defined at <interactive>:18:1
pattern Pue :: a -> a1 -> (a, Ex) -- Defined at <interactive>:19:1
-pattern Pur :: (Num a, Eq a) => a -> [a]
+pattern Pur :: (Eq a, Num a) => a -> [a]
-- Defined at <interactive>:20:1
-pattern Purp :: (Num a, Eq a) => Show a1 => a
- -> a1 -> ([a], UnivProv a1)
+pattern Purp
+ :: (Eq a, Num a) => Show a1 => a -> a1 -> ([a], UnivProv a1)
-- Defined at <interactive>:21:1
-pattern Pure :: (Num a, Eq a) => a -> a1 -> ([a], Ex)
+pattern Pure :: (Eq a, Num a) => a -> a1 -> ([a], Ex)
-- Defined at <interactive>:22:1
-pattern Purep :: (Num a, Eq a) => Show a1 => a
- -> a1 -> ([a], ExProv)
+pattern Purep
+ :: (Eq a, Num a) => Show a1 => a -> a1 -> ([a], ExProv)
-- Defined at <interactive>:23:1
pattern Pep :: () => Show a => a -> ExProv
-- Defined at <interactive>:24:1
@@ -29,21 +29,28 @@ pattern Pe :: () => forall {a}. a -> Ex
pattern Pu :: forall {p}. p -> p -- Defined at <interactive>:18:1
pattern Pue :: forall {a}. () => forall {a1}. a -> a1 -> (a, Ex)
-- Defined at <interactive>:19:1
-pattern Pur :: forall {a}. (Num a, Eq a) => a -> [a]
+pattern Pur :: forall {a}. (Eq a, Num a) => a -> [a]
-- Defined at <interactive>:20:1
-pattern Purp :: forall {a} {a1}. (Num a, Eq a) => Show a1 => a
- -> a1 -> ([a], UnivProv a1)
+pattern Purp
+ :: forall {a} {a1}.
+ (Eq a, Num a) =>
+ Show a1 =>
+ a -> a1 -> ([a], UnivProv a1)
-- Defined at <interactive>:21:1
-pattern Pure :: forall {a}. (Num a, Eq a) => forall {a1}. a
- -> a1 -> ([a], Ex)
+pattern Pure
+ :: forall {a}. (Eq a, Num a) => forall {a1}. a -> a1 -> ([a], Ex)
-- Defined at <interactive>:22:1
-pattern Purep :: forall {a}. (Num a, Eq a) => forall {a1}. Show
- a1 => a -> a1 -> ([a], ExProv)
+pattern Purep
+ :: forall {a}.
+ (Eq a, Num a) =>
+ forall {a1}.
+ Show a1 =>
+ a -> a1 -> ([a], ExProv)
-- Defined at <interactive>:23:1
pattern Pep :: () => forall {a}. Show a => a -> ExProv
-- Defined at <interactive>:24:1
pattern Pup :: forall {a}. () => Show a => a -> UnivProv a
-- Defined at <interactive>:25:1
-pattern Puep :: forall {b}. () => forall {a}. Show a => a
- -> b -> (ExProv, b)
+pattern Puep
+ :: forall {b}. () => forall {a}. Show a => a -> b -> (ExProv, b)
-- Defined at <interactive>:26:1
diff --git a/testsuite/tests/ghci/scripts/T11547.script b/testsuite/tests/ghci/scripts/T11547.script
deleted file mode 100644
index c4c15d6f78..0000000000
--- a/testsuite/tests/ghci/scripts/T11547.script
+++ /dev/null
@@ -1,9 +0,0 @@
-foo = foo
-:t Ghci1.foo
-foo = foo
-:t Ghci2.foo
-:t Ghci1.foo
-data Foo = Foo | Bar
-data Foo = Bar
-:t Foo
-:t Ghci3.Bar
diff --git a/testsuite/tests/ghci/scripts/T11547.stdout b/testsuite/tests/ghci/scripts/T11547.stdout
deleted file mode 100644
index 6f2a8333c3..0000000000
--- a/testsuite/tests/ghci/scripts/T11547.stdout
+++ /dev/null
@@ -1,5 +0,0 @@
-Ghci1.foo :: t
-Ghci2.foo :: t
-Ghci1.foo :: t
-Foo :: Ghci3.Foo
-Ghci3.Bar :: Ghci3.Foo
diff --git a/testsuite/tests/ghci/scripts/T11721.script b/testsuite/tests/ghci/scripts/T11721.script
new file mode 100644
index 0000000000..11fa313e3c
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T11721.script
@@ -0,0 +1,7 @@
+:set -XGADTs -XPolyKinds -XTypeApplications
+:set -fprint-explicit-foralls
+import Data.Proxy
+data X a where { MkX :: b -> Proxy a -> X a }
+:type +v MkX
+:type +v MkX @Int
+:type +v MkX @Int @Maybe
diff --git a/testsuite/tests/ghci/scripts/T11721.stdout b/testsuite/tests/ghci/scripts/T11721.stdout
new file mode 100644
index 0000000000..145a5894dc
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T11721.stdout
@@ -0,0 +1,3 @@
+MkX :: forall {k} b (a :: k). b -> Proxy a -> X a
+MkX @Int :: forall {k} (a :: k). Int -> Proxy a -> X a
+MkX @Int @Maybe :: Int -> Proxy Maybe -> X Maybe
diff --git a/testsuite/tests/ghci/scripts/T11975.stdout b/testsuite/tests/ghci/scripts/T11975.stdout
index 1a3dd4341a..56d8d4180d 100644
--- a/testsuite/tests/ghci/scripts/T11975.stdout
+++ b/testsuite/tests/ghci/scripts/T11975.stdout
@@ -1,15 +1,15 @@
mapM
:: forall {t :: * -> *} {m :: * -> *} {a} {b}.
- (Monad m, Traversable t) =>
+ (Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM
- :: forall (t :: * -> *).
- Traversable t =>
- forall (m :: * -> *) a b. Monad m => (a -> m b) -> t a -> m (t b)
+ :: forall (t :: * -> *) (m :: * -> *) a b.
+ (Traversable t, Monad m) =>
+ (a -> m b) -> t a -> m (t b)
mapM
- :: forall (t :: * -> *).
- Traversable t =>
- forall (m :: * -> *) a b. Monad m => (a -> m b) -> t a -> m (t b)
+ :: forall (t :: * -> *) (m :: * -> *) a b.
+ (Traversable t, Monad m) =>
+ (a -> m b) -> t a -> m (t b)
foo @Int :: forall {b}. Num b => Int -> b
foo @Int :: forall b. (Show Int, Num b) => Int -> b
foo @Int :: forall b. (Show Int, Num b) => Int -> b
diff --git a/testsuite/tests/ghci/scripts/T12023.script b/testsuite/tests/ghci/scripts/T12023.script
new file mode 100644
index 0000000000..c7552fe4f8
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T12023.script
@@ -0,0 +1 @@
+:browse GHC.Prim
diff --git a/testsuite/tests/ghci/scripts/T12023.stdout b/testsuite/tests/ghci/scripts/T12023.stdout
new file mode 100644
index 0000000000..573541ac97
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T12023.stdout
@@ -0,0 +1 @@
+0
diff --git a/testsuite/tests/ghci/scripts/T12158.script b/testsuite/tests/ghci/scripts/T12158.script
new file mode 100644
index 0000000000..d18f360513
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T12158.script
@@ -0,0 +1,2 @@
+data Stock = Stock {name :: String, ric :: String, price :: Float} deriving (Show)
+price Stock{name=name,ric=ric,price=price} = price
diff --git a/testsuite/tests/ghci/scripts/T12447.stdout b/testsuite/tests/ghci/scripts/T12447.stdout
index 67bbc9bcc7..6c469eeef3 100644
--- a/testsuite/tests/ghci/scripts/T12447.stdout
+++ b/testsuite/tests/ghci/scripts/T12447.stdout
@@ -1,3 +1,3 @@
deferEither @(_ ~ _)
- :: Deferrable (w2 ~ w1) =>
- proxy (w2 ~ w1) -> (w2 ~ w1 => r) -> Either String r
+ :: (Typeable w1, Typeable w2) =>
+ proxy (w1 ~ w2) -> ((w1 ~ w2) => r) -> Either String r
diff --git a/testsuite/tests/ghci/scripts/T12550.script b/testsuite/tests/ghci/scripts/T12550.script
index dad2a47e65..7c07e8f1dd 100644
--- a/testsuite/tests/ghci/scripts/T12550.script
+++ b/testsuite/tests/ghci/scripts/T12550.script
@@ -1,4 +1,4 @@
-:set -fprint-explicit-foralls -XKindSignatures -XExplicitNamespaces
+:set -fprint-explicit-foralls -XKindSignatures -XExplicitNamespaces -XUnicodeSyntax
import Data.Kind (type Type)
diff --git a/testsuite/tests/ghci/scripts/T12550.stdout b/testsuite/tests/ghci/scripts/T12550.stdout
index d4ac6b86fb..0955db3787 100644
--- a/testsuite/tests/ghci/scripts/T12550.stdout
+++ b/testsuite/tests/ghci/scripts/T12550.stdout
@@ -35,15 +35,15 @@ instance ∀ i (c ∷ Meta) (f ∷ ★ → ★). Functor f ⇒ Functor (M1 i c f
-- Defined in ‘GHC.Generics’
instance ∀ i c. Functor (K1 i c) -- Defined in ‘GHC.Generics’
instance ∀ (f ∷ ★ → ★) (g ∷ ★ → ★).
- (Functor g, Functor f) ⇒
+ (Functor f, Functor g) ⇒
Functor (f :.: g)
-- Defined in ‘GHC.Generics’
instance ∀ (f ∷ ★ → ★) (g ∷ ★ → ★).
- (Functor g, Functor f) ⇒
+ (Functor f, Functor g) ⇒
Functor (f :+: g)
-- Defined in ‘GHC.Generics’
instance ∀ (f ∷ ★ → ★) (g ∷ ★ → ★).
- (Functor g, Functor f) ⇒
+ (Functor f, Functor g) ⇒
Functor (f :*: g)
-- Defined in ‘GHC.Generics’
instance ∀ a. Functor (Either a) -- Defined in ‘Data.Either’
diff --git a/testsuite/tests/ghci/scripts/T13407.script b/testsuite/tests/ghci/scripts/T13407.script
new file mode 100644
index 0000000000..3956a3a210
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T13407.script
@@ -0,0 +1,4 @@
+:set -XPolyKinds -XRankNTypes
+import Data.Kind
+data Foo :: (Type -> Type) -> (forall k. k -> Type)
+:info Foo
diff --git a/testsuite/tests/ghci/scripts/T13407.stdout b/testsuite/tests/ghci/scripts/T13407.stdout
new file mode 100644
index 0000000000..083f3a8b1f
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T13407.stdout
@@ -0,0 +1,3 @@
+type role Foo phantom phantom
+data Foo (a :: * -> *) (b :: k)
+ -- Defined at <interactive>:3:1
diff --git a/testsuite/tests/ghci/scripts/T13963.script b/testsuite/tests/ghci/scripts/T13963.script
new file mode 100644
index 0000000000..c5e830aad1
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T13963.script
@@ -0,0 +1,13 @@
+:set -XPolyKinds -XDataKinds -XRankNTypes
+import GHC.Exts (TYPE, RuntimeRep(LiftedRep))
+type Pair (a :: TYPE rep) (b :: TYPE rep') rep'' = forall (r :: TYPE rep''). (a -> b -> r)
+:kind Pair
+:kind Pair Int
+:kind Pair Int Float
+:kind Pair Int Float LiftedRep
+
+:set -fprint-explicit-runtime-reps
+:kind Pair
+:kind Pair Int
+:kind Pair Int Float
+:kind Pair Int Float LiftedRep
diff --git a/testsuite/tests/ghci/scripts/T13963.stdout b/testsuite/tests/ghci/scripts/T13963.stdout
new file mode 100644
index 0000000000..52026af489
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T13963.stdout
@@ -0,0 +1,8 @@
+Pair :: * -> * -> RuntimeRep -> *
+Pair Int :: * -> RuntimeRep -> *
+Pair Int Float :: RuntimeRep -> *
+Pair Int Float LiftedRep :: *
+Pair :: TYPE rep -> TYPE rep' -> RuntimeRep -> *
+Pair Int :: * -> RuntimeRep -> *
+Pair Int Float :: RuntimeRep -> *
+Pair Int Float LiftedRep :: *
diff --git a/testsuite/tests/ghci/scripts/T13988.hs b/testsuite/tests/ghci/scripts/T13988.hs
new file mode 100644
index 0000000000..d26135e26d
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T13988.hs
@@ -0,0 +1,8 @@
+{-# LANGUAGE PolyKinds, GADTs #-}
+
+module T13988 where
+
+import Data.Kind
+
+data Foo (a :: k) where
+ MkFoo :: (k ~ Type) => Foo (a :: k)
diff --git a/testsuite/tests/ghci/scripts/T13988.script b/testsuite/tests/ghci/scripts/T13988.script
new file mode 100644
index 0000000000..06aa686ed5
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T13988.script
@@ -0,0 +1,2 @@
+:load T13988
+:type +v MkFoo
diff --git a/testsuite/tests/ghci/scripts/T13988.stdout b/testsuite/tests/ghci/scripts/T13988.stdout
new file mode 100644
index 0000000000..a89ff3331d
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T13988.stdout
@@ -0,0 +1 @@
+MkFoo :: forall k (a :: k). (k ~ *) => Foo a
diff --git a/testsuite/tests/ghci/scripts/T14342.script b/testsuite/tests/ghci/scripts/T14342.script
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T14342.script
diff --git a/testsuite/tests/ghci/scripts/T14676.script b/testsuite/tests/ghci/scripts/T14676.script
new file mode 100644
index 0000000000..9cfe6934fe
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T14676.script
@@ -0,0 +1,7 @@
+:add Notfound.hs
+:add NotFound
+:show targets
+:add prog002/A1.hs
+:show targets
+:unadd prog002/A1.hs
+:show targets
diff --git a/testsuite/tests/ghci/scripts/T14676.stdout b/testsuite/tests/ghci/scripts/T14676.stdout
new file mode 100644
index 0000000000..c3e9fbd6b4
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T14676.stdout
@@ -0,0 +1,3 @@
+File Notfound.hs not found
+Module NotFound not found
+prog002/A1.hs
diff --git a/testsuite/tests/ghci/scripts/T14796.script b/testsuite/tests/ghci/scripts/T14796.script
new file mode 100644
index 0000000000..9a85d440ef
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T14796.script
@@ -0,0 +1,3 @@
+:set -XGADTs -XConstraintKinds -XTypeApplications
+data ECC ctx f a where ECC :: ctx => f a -> ECC ctx f a
+:t ECC @() @[] @()
diff --git a/testsuite/tests/ghci/scripts/T14796.stdout b/testsuite/tests/ghci/scripts/T14796.stdout
new file mode 100644
index 0000000000..c8bb21936a
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T14796.stdout
@@ -0,0 +1 @@
+ECC @() @[] @() :: [()] -> ECC (() :: Constraint) [] ()
diff --git a/testsuite/tests/ghci/scripts/T14969.script b/testsuite/tests/ghci/scripts/T14969.script
new file mode 100644
index 0000000000..ab6af53c6b
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T14969.script
@@ -0,0 +1 @@
+3 _ 4
diff --git a/testsuite/tests/ghci/scripts/T14969.stderr b/testsuite/tests/ghci/scripts/T14969.stderr
new file mode 100644
index 0000000000..b581657d3c
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T14969.stderr
@@ -0,0 +1,7 @@
+
+<interactive>:1:1: error:
+ • Non type-variable argument
+ in the constraint: Num (t2 -> t1 -> t3)
+ (Use FlexibleContexts to permit this)
+ • When checking the inferred type
+ it :: forall t1 t2 t3. (Num t1, Num (t2 -> t1 -> t3)) => t3
diff --git a/testsuite/tests/ghci/scripts/T15259.script b/testsuite/tests/ghci/scripts/T15259.script
new file mode 100644
index 0000000000..a2750c3a08
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T15259.script
@@ -0,0 +1,3 @@
+:set -fdefer-out-of-scope-variables
+
+1 + a
diff --git a/testsuite/tests/ghci/scripts/T15259.stderr b/testsuite/tests/ghci/scripts/T15259.stderr
new file mode 100644
index 0000000000..29a04a6487
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T15259.stderr
@@ -0,0 +1,2 @@
+
+<interactive>:3:5: error: Variable not in scope: a
diff --git a/testsuite/tests/ghci/scripts/T15325.hs b/testsuite/tests/ghci/scripts/T15325.hs
new file mode 100644
index 0000000000..3a0407bfcb
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T15325.hs
@@ -0,0 +1,11 @@
+{-# OPTIONS_GHC -fdefer-type-errors #-}
+module T15325 where
+
+class PolyList e where
+ polyList :: e -> ()
+
+f :: PolyList e => e -> ()
+f x = polyList x
+
+plh :: ()
+plh = f 0
diff --git a/testsuite/tests/ghci/scripts/T15325.script b/testsuite/tests/ghci/scripts/T15325.script
new file mode 100644
index 0000000000..227c00ce66
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T15325.script
@@ -0,0 +1,2 @@
+:l T15325
+plh
diff --git a/testsuite/tests/ghci/scripts/T15325.stderr b/testsuite/tests/ghci/scripts/T15325.stderr
new file mode 100644
index 0000000000..c767528e2c
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T15325.stderr
@@ -0,0 +1,25 @@
+
+T15325.hs:11:7: warning: [-Wdeferred-type-errors (in -Wdefault)]
+ • No instance for (PolyList e0) arising from a use of ‘f’
+ • In the expression: f 0
+ In an equation for ‘plh’: plh = f 0
+
+T15325.hs:11:9: warning: [-Wdeferred-type-errors (in -Wdefault)]
+ • Ambiguous type variable ‘e0’ arising from the literal ‘0’
+ prevents the constraint ‘(Num e0)’ from being solved.
+ Probable fix: use a type annotation to specify what ‘e0’ should be.
+ These potential instances exist:
+ instance Num Integer -- Defined in ‘GHC.Num’
+ instance Num Double -- Defined in ‘GHC.Float’
+ instance Num Float -- Defined in ‘GHC.Float’
+ ...plus two others
+ ...plus one instance involving out-of-scope types
+ (use -fprint-potential-instances to see them all)
+ • In the first argument of ‘f’, namely ‘0’
+ In the expression: f 0
+ In an equation for ‘plh’: plh = f 0
+*** Exception: T15325.hs:11:7: error:
+ • No instance for (PolyList e0) arising from a use of ‘f’
+ • In the expression: f 0
+ In an equation for ‘plh’: plh = f 0
+(deferred type error)
diff --git a/testsuite/tests/ghci/scripts/T15341.hs b/testsuite/tests/ghci/scripts/T15341.hs
new file mode 100644
index 0000000000..b84c1bbe10
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T15341.hs
@@ -0,0 +1,6 @@
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE TypeFamilies #-}
+module T15341 where
+
+type family Foo (a :: k) :: k where
+ Foo a = a
diff --git a/testsuite/tests/ghci/scripts/T15341.script b/testsuite/tests/ghci/scripts/T15341.script
new file mode 100644
index 0000000000..0a3ffdc5d3
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T15341.script
@@ -0,0 +1,4 @@
+:load T15341.hs
+:info Foo
+:set -fprint-explicit-kinds
+:info Foo
diff --git a/testsuite/tests/ghci/scripts/T15341.stdout b/testsuite/tests/ghci/scripts/T15341.stdout
new file mode 100644
index 0000000000..1d29dc7f8f
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T15341.stdout
@@ -0,0 +1,6 @@
+type family Foo (a :: k) :: k
+ where Foo a = a
+ -- Defined at T15341.hs:5:1
+type family Foo k (a :: k) :: k
+ where Foo k a = a
+ -- Defined at T15341.hs:5:1
diff --git a/testsuite/tests/ghci/scripts/T15568.hs b/testsuite/tests/ghci/scripts/T15568.hs
new file mode 100644
index 0000000000..2172fe2694
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T15568.hs
@@ -0,0 +1,7 @@
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE TypeFamilies #-}
+module T15568 where
+
+import Data.Proxy
+
+type family F (a :: j) :: k
diff --git a/testsuite/tests/ghci/scripts/T15568.script b/testsuite/tests/ghci/scripts/T15568.script
new file mode 100644
index 0000000000..8218ccc7fd
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T15568.script
@@ -0,0 +1,4 @@
+:load T15568
+:set -fprint-explicit-foralls
+putStrLn "-- This should print 'forall j k.', not 'forall k j.'"
+:kind F
diff --git a/testsuite/tests/ghci/scripts/T15568.stdout b/testsuite/tests/ghci/scripts/T15568.stdout
new file mode 100644
index 0000000000..e97cc6b040
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T15568.stdout
@@ -0,0 +1,2 @@
+-- This should print 'forall j k.', not 'forall k j.'
+F :: forall j k. j -> k
diff --git a/testsuite/tests/ghci/scripts/T1914.stdout b/testsuite/tests/ghci/scripts/T1914.stdout
index 2d1a82b275..6612564354 100644
--- a/testsuite/tests/ghci/scripts/T1914.stdout
+++ b/testsuite/tests/ghci/scripts/T1914.stdout
@@ -1,7 +1,7 @@
[1 of 2] Compiling T1914B ( T1914B.hs, interpreted )
[2 of 2] Compiling T1914A ( T1914A.hs, interpreted )
-Ok, 2 modules loaded.
+Ok, two modules loaded.
[2 of 2] Compiling T1914A ( T1914A.hs, interpreted )
-Failed, 1 module loaded.
+Failed, one module loaded.
[2 of 2] Compiling T1914A ( T1914A.hs, interpreted )
-Ok, 2 modules loaded.
+Ok, two modules loaded.
diff --git a/testsuite/tests/ghci/scripts/T2976.stdout b/testsuite/tests/ghci/scripts/T2976.stdout
index de31112bb3..9fdc11072c 100644
--- a/testsuite/tests/ghci/scripts/T2976.stdout
+++ b/testsuite/tests/ghci/scripts/T2976.stdout
@@ -1,8 +1,6 @@
test :: Integer = 0
test = 0
test :: Integer = 0
-Ghci1.test :: Integer = 0
test :: [Char] = _
test = "test"
-Ghci1.test :: Integer = 0
test :: [Char] = "test"
diff --git a/testsuite/tests/ghci/scripts/T4175.stdout b/testsuite/tests/ghci/scripts/T4175.stdout
index 6f56a5f868..75d6c27506 100644
--- a/testsuite/tests/ghci/scripts/T4175.stdout
+++ b/testsuite/tests/ghci/scripts/T4175.stdout
@@ -21,6 +21,7 @@ instance C () -- Defined at T4175.hs:21:10
instance Eq () -- Defined in ‘GHC.Classes’
instance Monoid () -- Defined in ‘GHC.Base’
instance Ord () -- Defined in ‘GHC.Classes’
+instance Semigroup () -- Defined in ‘GHC.Base’
instance Show () -- Defined in ‘GHC.Show’
instance Read () -- Defined in ‘GHC.Read’
instance Enum () -- Defined in ‘GHC.Enum’
@@ -28,13 +29,15 @@ instance Bounded () -- Defined in ‘GHC.Enum’
type instance D () () = Bool -- Defined at T4175.hs:22:10
type instance D Int () = String -- Defined at T4175.hs:19:10
data instance B () = MkB -- Defined at T4175.hs:13:15
-data Maybe a = Nothing | Just a -- Defined in ‘GHC.Base’
+data Maybe a = Nothing | Just a -- Defined in ‘GHC.Maybe’
instance Applicative Maybe -- Defined in ‘GHC.Base’
-instance Eq a => Eq (Maybe a) -- Defined in ‘GHC.Base’
+instance Eq a => Eq (Maybe a) -- Defined in ‘GHC.Maybe’
instance Functor Maybe -- Defined in ‘GHC.Base’
instance Monad Maybe -- Defined in ‘GHC.Base’
-instance Monoid a => Monoid (Maybe a) -- Defined in ‘GHC.Base’
-instance Ord a => Ord (Maybe a) -- Defined in ‘GHC.Base’
+instance Semigroup a => Monoid (Maybe a) -- Defined in ‘GHC.Base’
+instance Ord a => Ord (Maybe a) -- Defined in ‘GHC.Maybe’
+instance Semigroup a => Semigroup (Maybe a)
+ -- Defined in ‘GHC.Base’
instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’
instance Read a => Read (Maybe a) -- Defined in ‘GHC.Read’
instance Foldable Maybe -- Defined in ‘Data.Foldable’
diff --git a/testsuite/tests/ghci/scripts/T6105.stdout b/testsuite/tests/ghci/scripts/T6105.stdout
index 6a846e3f21..9a8190f26c 100644
--- a/testsuite/tests/ghci/scripts/T6105.stdout
+++ b/testsuite/tests/ghci/scripts/T6105.stdout
@@ -1,4 +1,4 @@
[1 of 1] Compiling T6105 ( T6105.hs, interpreted )
-Ok, 1 module loaded.
+Ok, one module loaded.
[1 of 1] Compiling T6105 ( T6105.hs, interpreted )
-Ok, 1 module loaded.
+Ok, one module loaded.
diff --git a/testsuite/tests/ghci/scripts/T7627.stdout b/testsuite/tests/ghci/scripts/T7627.stdout
index c13a3f3ba0..8bf93a0d0f 100644
--- a/testsuite/tests/ghci/scripts/T7627.stdout
+++ b/testsuite/tests/ghci/scripts/T7627.stdout
@@ -2,11 +2,13 @@ data () = () -- Defined in ‘GHC.Tuple’
instance Eq () -- Defined in ‘GHC.Classes’
instance Monoid () -- Defined in ‘GHC.Base’
instance Ord () -- Defined in ‘GHC.Classes’
+instance Semigroup () -- Defined in ‘GHC.Base’
instance Show () -- Defined in ‘GHC.Show’
instance Read () -- Defined in ‘GHC.Read’
instance Enum () -- Defined in ‘GHC.Enum’
instance Bounded () -- Defined in ‘GHC.Enum’
-data (##) = (##) -- Defined in ‘GHC.Prim’
+data (##) :: TYPE ('GHC.Types.TupleRep '[]) = (##)
+ -- Defined in ‘GHC.Prim’
() :: ()
(##) :: (# #)
( ) :: ()
@@ -19,13 +21,17 @@ instance Monoid a => Monad ((,) a) -- Defined in ‘GHC.Base’
instance (Monoid a, Monoid b) => Monoid (a, b)
-- Defined in ‘GHC.Base’
instance (Ord a, Ord b) => Ord (a, b) -- Defined in ‘GHC.Classes’
+instance (Semigroup a, Semigroup b) => Semigroup (a, b)
+ -- Defined in ‘GHC.Base’
instance (Show a, Show b) => Show (a, b) -- Defined in ‘GHC.Show’
instance (Read a, Read b) => Read (a, b) -- Defined in ‘GHC.Read’
instance Foldable ((,) a) -- Defined in ‘Data.Foldable’
instance Traversable ((,) a) -- Defined in ‘Data.Traversable’
instance (Bounded a, Bounded b) => Bounded (a, b)
-- Defined in ‘GHC.Enum’
-data (#,#) (a :: TYPE k0) (b :: TYPE k1) = (#,#) a b
+data (#,#) (a :: TYPE k0) (b :: TYPE k1) :: TYPE
+ ('GHC.Types.TupleRep '[k0, k1])
+ = (#,#) a b
-- Defined in ‘GHC.Prim’
(,) :: a -> b -> (a, b)
(#,#) :: a -> b -> (# a, b #)
diff --git a/testsuite/tests/ghci/scripts/T7730.stdout b/testsuite/tests/ghci/scripts/T7730.stdout
index e96e909413..bf9c1d025b 100644
--- a/testsuite/tests/ghci/scripts/T7730.stdout
+++ b/testsuite/tests/ghci/scripts/T7730.stdout
@@ -3,6 +3,5 @@ data A (x :: k) (y :: k1)
-- Defined at <interactive>:2:1
A :: k1 -> k2 -> *
type role T phantom
-data T (a :: k) where
- MkT :: forall k (a :: k) a1. a1 -> T a
+data T (a :: k) = forall a1. MkT a1
-- Defined at <interactive>:6:1
diff --git a/testsuite/tests/ghci/scripts/T7873.script b/testsuite/tests/ghci/scripts/T7873.script
index 404c1f5bda..1a358a478e 100644
--- a/testsuite/tests/ghci/scripts/T7873.script
+++ b/testsuite/tests/ghci/scripts/T7873.script
@@ -1,4 +1,4 @@
-:set -XPolyKinds -XRankNTypes -XGADTs -XTypeInType
+:set -XPolyKinds -XRankNTypes -XGADTs
data D1 = MkD1 (forall p (a :: k). p a -> Int)
data D2 = MkD2 (forall p a. p a -> Int)
data D3 = MkD3 (forall k p (a :: k). p a -> Int)
diff --git a/testsuite/tests/ghci/scripts/T7873.stderr b/testsuite/tests/ghci/scripts/T7873.stderr
index c218cff153..731a216a1a 100644
--- a/testsuite/tests/ghci/scripts/T7873.stderr
+++ b/testsuite/tests/ghci/scripts/T7873.stderr
@@ -1,6 +1,8 @@
<interactive>:2:1: error:
- Kind variable ‘k’ is implicitly bound in data type
- ‘D1’, but does not appear as the kind of any
- of its type variables. Perhaps you meant
- to bind it explicitly somewhere?
+ • Kind variable ‘k’ is implicitly bound in data type
+ ‘D1’, but does not appear as the kind of any
+ of its type variables. Perhaps you meant
+ to bind it explicitly somewhere?
+ Type variables with inferred kinds: (k :: *)
+ • In the data declaration for ‘D1’
diff --git a/testsuite/tests/ghci/scripts/T7873.stdout b/testsuite/tests/ghci/scripts/T7873.stdout
index 2c79056da4..bcdebe71e1 100644
--- a/testsuite/tests/ghci/scripts/T7873.stdout
+++ b/testsuite/tests/ghci/scripts/T7873.stdout
@@ -1,5 +1,5 @@
-data D2 where
- MkD2 :: (forall (p :: k -> *) (a :: k). p a -> Int) -> D2
+data D2
+ = forall k. MkD2 (forall (p :: k -> *) (a :: k). p a -> Int)
-- Defined at <interactive>:3:1
data D3 = MkD3 (forall k (p :: k -> *) (a :: k). p a -> Int)
-- Defined at <interactive>:4:1
diff --git a/testsuite/tests/ghci/scripts/T7939.hs b/testsuite/tests/ghci/scripts/T7939.hs
index fbdf883b51..04a1f1a623 100644
--- a/testsuite/tests/ghci/scripts/T7939.hs
+++ b/testsuite/tests/ghci/scripts/T7939.hs
@@ -1,6 +1,6 @@
{-# LANGUAGE TypeFamilies, PolyKinds, DataKinds, TypeOperators #-}
-
module T7939 where
+import Data.Kind (Type)
class Foo a where
type Bar a b
@@ -22,6 +22,6 @@ type family K a where
K '[] = Nothing
K (h ': t) = Just h
-type family L (a :: k) (b :: *) :: k where
+type family L (a :: k) (b :: Type) :: k where
L Int Int = Bool
L Maybe Bool = IO
diff --git a/testsuite/tests/ghci/scripts/T7939.stdout b/testsuite/tests/ghci/scripts/T7939.stdout
index db2590c930..82a8658906 100644
--- a/testsuite/tests/ghci/scripts/T7939.stdout
+++ b/testsuite/tests/ghci/scripts/T7939.stdout
@@ -15,13 +15,13 @@ type family H (a :: Bool) :: Bool
H :: Bool -> Bool
type family J (a :: [k]) :: Bool
where
- J k '[] = 'False
- J k (h : t) = 'True
+ J '[] = 'False
+ J (h : t) = 'True
-- Defined at T7939.hs:17:1
J :: [k] -> Bool
type family K (a1 :: [a]) :: Maybe a
where
- K a '[] = 'Nothing
- K a (h : t) = 'Just h
+ K '[] = 'Nothing
+ K (h : t) = 'Just h
-- Defined at T7939.hs:21:1
K :: [a] -> Maybe a
diff --git a/testsuite/tests/ghci/scripts/T8353.stderr b/testsuite/tests/ghci/scripts/T8353.stderr
index 863a64fc4e..a84b0b7e83 100644
--- a/testsuite/tests/ghci/scripts/T8353.stderr
+++ b/testsuite/tests/ghci/scripts/T8353.stderr
@@ -9,7 +9,17 @@ Defer03.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
• In the expression: _
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
- Valid substitutions include a :: Int (defined at Defer03.hs:4:1)
+ Valid hole fits include
+ f :: Int (bound at Defer03.hs:7:1)
+ a :: Int (defined at Defer03.hs:4:1)
+ maxBound :: forall a. Bounded a => a
+ with maxBound @Int
+ (imported from ‘Prelude’ at Defer03.hs:1:8-11
+ (and originally defined in ‘GHC.Enum’))
+ minBound :: forall a. Bounded a => a
+ with minBound @Int
+ (imported from ‘Prelude’ at Defer03.hs:1:8-11
+ (and originally defined in ‘GHC.Enum’))
Defer03.hs:4:5: error:
• Couldn't match expected type ‘Int’ with actual type ‘Char’
@@ -21,7 +31,17 @@ Defer03.hs:7:5: error:
• In the expression: _
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
- Valid substitutions include a :: Int (defined at Defer03.hs:4:1)
+ Valid hole fits include
+ f :: Int (bound at Defer03.hs:7:1)
+ a :: Int (defined at Defer03.hs:4:1)
+ maxBound :: forall a. Bounded a => a
+ with maxBound @Int
+ (imported from ‘Prelude’ at Defer03.hs:1:8-11
+ (and originally defined in ‘GHC.Enum’))
+ minBound :: forall a. Bounded a => a
+ with minBound @Int
+ (imported from ‘Prelude’ at Defer03.hs:1:8-11
+ (and originally defined in ‘GHC.Enum’))
Defer03.hs:4:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Couldn't match expected type ‘Int’ with actual type ‘Char’
@@ -33,7 +53,17 @@ Defer03.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
• In the expression: _
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
- Valid substitutions include a :: Int (defined at Defer03.hs:4:1)
+ Valid hole fits include
+ f :: Int (bound at Defer03.hs:7:1)
+ a :: Int (defined at Defer03.hs:4:1)
+ maxBound :: forall a. Bounded a => a
+ with maxBound @Int
+ (imported from ‘Prelude’ at Defer03.hs:1:8-11
+ (and originally defined in ‘GHC.Enum’))
+ minBound :: forall a. Bounded a => a
+ with minBound @Int
+ (imported from ‘Prelude’ at Defer03.hs:1:8-11
+ (and originally defined in ‘GHC.Enum’))
Defer03.hs:4:5: error:
• Couldn't match expected type ‘Int’ with actual type ‘Char’
@@ -45,7 +75,17 @@ Defer03.hs:7:5: error:
• In the expression: _
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
- Valid substitutions include a :: Int (defined at Defer03.hs:4:1)
+ Valid hole fits include
+ f :: Int (bound at Defer03.hs:7:1)
+ a :: Int (defined at Defer03.hs:4:1)
+ maxBound :: forall a. Bounded a => a
+ with maxBound @Int
+ (imported from ‘Prelude’ at Defer03.hs:1:8-11
+ (and originally defined in ‘GHC.Enum’))
+ minBound :: forall a. Bounded a => a
+ with minBound @Int
+ (imported from ‘Prelude’ at Defer03.hs:1:8-11
+ (and originally defined in ‘GHC.Enum’))
Defer03.hs:4:5: warning: [-Wdeferred-type-errors (in -Wdefault)]
• Couldn't match expected type ‘Int’ with actual type ‘Char’
@@ -57,4 +97,14 @@ Defer03.hs:7:5: warning: [-Wtyped-holes (in -Wdefault)]
• In the expression: _
In an equation for ‘f’: f = _
• Relevant bindings include f :: Int (bound at Defer03.hs:7:1)
- Valid substitutions include a :: Int (defined at Defer03.hs:4:1)
+ Valid hole fits include
+ f :: Int (bound at Defer03.hs:7:1)
+ a :: Int (defined at Defer03.hs:4:1)
+ maxBound :: forall a. Bounded a => a
+ with maxBound @Int
+ (imported from ‘Prelude’ at Defer03.hs:1:8-11
+ (and originally defined in ‘GHC.Enum’))
+ minBound :: forall a. Bounded a => a
+ with minBound @Int
+ (imported from ‘Prelude’ at Defer03.hs:1:8-11
+ (and originally defined in ‘GHC.Enum’))
diff --git a/testsuite/tests/ghci/scripts/T8357.hs b/testsuite/tests/ghci/scripts/T8357.hs
index 82a34afdc6..322ec11e19 100644
--- a/testsuite/tests/ghci/scripts/T8357.hs
+++ b/testsuite/tests/ghci/scripts/T8357.hs
@@ -5,11 +5,12 @@
{-# LANGUAGE TypeOperators #-}
module T8357 where
+import Data.Kind (Type)
import GHC.TypeLits
data (:::) (sy :: Symbol) ty
data Key (sy :: Symbol)
-data Rec (rs :: [*])
+data Rec (rs :: [Type])
(*=) :: Key sy -> ty -> Rec '[sy ::: ty]
(*=) = undefined
@@ -17,7 +18,7 @@ data Rec (rs :: [*])
(.*.) :: (Union xs ys ~ rs) => Rec xs -> Rec ys -> Rec rs
(.*.) = undefined
-type family Union (xs :: [*]) (ys :: [*]) :: [*] where
+type family Union (xs :: [Type]) (ys :: [Type]) :: [Type] where
Union ((sy ::: t) ': xs) ys = (sy ::: t) ': Union xs ys
Union '[] ys = ys
@@ -30,4 +31,4 @@ fBar = undefined
foo = fFoo *= "foo"
bar = fBar *= "bar"
-both = foo .*. bar \ No newline at end of file
+both = foo .*. bar
diff --git a/testsuite/tests/ghci/scripts/T8535.stdout b/testsuite/tests/ghci/scripts/T8535.stdout
index 3995bc0b20..6ae0c4ccfe 100644
--- a/testsuite/tests/ghci/scripts/T8535.stdout
+++ b/testsuite/tests/ghci/scripts/T8535.stdout
@@ -1,6 +1,7 @@
data (->) (a :: TYPE q) (b :: TYPE r) -- Defined in ‘GHC.Prim’
-infixr 0 `(->)`
+infixr 0 ->
instance Applicative ((->) a) -- Defined in ‘GHC.Base’
instance Functor ((->) r) -- Defined in ‘GHC.Base’
instance Monad ((->) r) -- Defined in ‘GHC.Base’
instance Monoid b => Monoid (a -> b) -- Defined in ‘GHC.Base’
+instance Semigroup b => Semigroup (a -> b) -- Defined in ‘GHC.Base’
diff --git a/testsuite/tests/ghci/scripts/T9181.stdout b/testsuite/tests/ghci/scripts/T9181.stdout
index d51b345d5c..5e520fb0a2 100644
--- a/testsuite/tests/ghci/scripts/T9181.stdout
+++ b/testsuite/tests/ghci/scripts/T9181.stdout
@@ -4,19 +4,22 @@ type family GHC.TypeLits.AppendSymbol (a :: GHC.Types.Symbol)
type family GHC.TypeLits.CmpSymbol (a :: GHC.Types.Symbol)
(b :: GHC.Types.Symbol)
:: Ordering
-data GHC.TypeLits.ErrorMessage where
- GHC.TypeLits.Text :: GHC.Types.Symbol -> GHC.TypeLits.ErrorMessage
- GHC.TypeLits.ShowType :: t -> GHC.TypeLits.ErrorMessage
- (GHC.TypeLits.:<>:) :: GHC.TypeLits.ErrorMessage
- -> GHC.TypeLits.ErrorMessage -> GHC.TypeLits.ErrorMessage
- (GHC.TypeLits.:$$:) :: GHC.TypeLits.ErrorMessage
- -> GHC.TypeLits.ErrorMessage -> GHC.TypeLits.ErrorMessage
+data GHC.TypeLits.ErrorMessage
+ = GHC.TypeLits.Text GHC.Types.Symbol
+ | forall t. GHC.TypeLits.ShowType t
+ | GHC.TypeLits.ErrorMessage
+ GHC.TypeLits.:<>:
+ GHC.TypeLits.ErrorMessage
+ | GHC.TypeLits.ErrorMessage
+ GHC.TypeLits.:$$:
+ GHC.TypeLits.ErrorMessage
class GHC.TypeLits.KnownSymbol (n :: GHC.Types.Symbol) where
GHC.TypeLits.symbolSing :: GHC.TypeLits.SSymbol n
{-# MINIMAL symbolSing #-}
-data GHC.TypeLits.SomeSymbol where
- GHC.TypeLits.SomeSymbol :: GHC.TypeLits.KnownSymbol n =>
- (Data.Proxy.Proxy n) -> GHC.TypeLits.SomeSymbol
+data GHC.TypeLits.SomeSymbol
+ = forall (n :: GHC.Types.Symbol).
+ GHC.TypeLits.KnownSymbol n =>
+ GHC.TypeLits.SomeSymbol (Data.Proxy.Proxy n)
type family GHC.TypeLits.TypeError (a :: GHC.TypeLits.ErrorMessage)
:: b
GHC.TypeLits.natVal ::
@@ -50,13 +53,21 @@ type family (GHC.TypeNats.<=?) (a :: GHC.Types.Nat)
type family GHC.TypeNats.CmpNat (a :: GHC.Types.Nat)
(b :: GHC.Types.Nat)
:: Ordering
+type family GHC.TypeNats.Div (a :: GHC.Types.Nat)
+ (b :: GHC.Types.Nat)
+ :: GHC.Types.Nat
class GHC.TypeNats.KnownNat (n :: GHC.Types.Nat) where
GHC.TypeNats.natSing :: GHC.TypeNats.SNat n
{-# MINIMAL natSing #-}
+type family GHC.TypeNats.Log2 (a :: GHC.Types.Nat) :: GHC.Types.Nat
+type family GHC.TypeNats.Mod (a :: GHC.Types.Nat)
+ (b :: GHC.Types.Nat)
+ :: GHC.Types.Nat
data GHC.Types.Nat
-data GHC.TypeNats.SomeNat where
- GHC.TypeNats.SomeNat :: GHC.TypeNats.KnownNat n =>
- (Data.Proxy.Proxy n) -> GHC.TypeNats.SomeNat
+data GHC.TypeNats.SomeNat
+ = forall (n :: GHC.Types.Nat).
+ GHC.TypeNats.KnownNat n =>
+ GHC.TypeNats.SomeNat (Data.Proxy.Proxy n)
data GHC.Types.Symbol
type family (GHC.TypeNats.^) (a :: GHC.Types.Nat)
(b :: GHC.Types.Nat)
diff --git a/testsuite/tests/ghci/scripts/T9293.stderr b/testsuite/tests/ghci/scripts/T9293.stderr
index 77cf2da0ec..4a72589688 100644
--- a/testsuite/tests/ghci/scripts/T9293.stderr
+++ b/testsuite/tests/ghci/scripts/T9293.stderr
@@ -1,19 +1,19 @@
<interactive>:4:1: error:
• Illegal generalised algebraic data declaration for ‘T’
- (Use GADTs to allow GADTs)
+ (Enable the GADTs extension to allow this)
• In the data declaration for ‘T’
ghci057.hs:3:3: error:
• Data constructor ‘C’ has existential type variables, a context, or a specialised result type
C :: T Int
- (Use ExistentialQuantification or GADTs to allow this)
+ (Enable ExistentialQuantification or GADTs to allow this)
• In the definition of data constructor ‘C’
In the data type declaration for ‘T’
ghci057.hs:3:3: error:
• Data constructor ‘C’ has existential type variables, a context, or a specialised result type
C :: T Int
- (Use ExistentialQuantification or GADTs to allow this)
+ (Enable ExistentialQuantification or GADTs to allow this)
• In the definition of data constructor ‘C’
In the data type declaration for ‘T’
diff --git a/testsuite/tests/ghci/scripts/T9293.stdout b/testsuite/tests/ghci/scripts/T9293.stdout
index b2de5417a2..2e5adc404c 100644
--- a/testsuite/tests/ghci/scripts/T9293.stdout
+++ b/testsuite/tests/ghci/scripts/T9293.stdout
@@ -6,6 +6,9 @@ with the following modifiers:
GHCi-specific dynamic flag settings:
other dynamic, non-language, flag settings:
-fno-diagnostics-show-caret
+ -fexternal-dynamic-refs
+ -fignore-optim-changes
+ -fignore-hpc-changes
-fno-ghci-history
-fimplicit-import-qualified
-fshow-warning-groups
@@ -22,6 +25,9 @@ with the following modifiers:
GHCi-specific dynamic flag settings:
other dynamic, non-language, flag settings:
-fno-diagnostics-show-caret
+ -fexternal-dynamic-refs
+ -fignore-optim-changes
+ -fignore-hpc-changes
-fno-ghci-history
-fimplicit-import-qualified
-fshow-warning-groups
@@ -37,6 +43,9 @@ with the following modifiers:
GHCi-specific dynamic flag settings:
other dynamic, non-language, flag settings:
-fno-diagnostics-show-caret
+ -fexternal-dynamic-refs
+ -fignore-optim-changes
+ -fignore-hpc-changes
-fno-ghci-history
-fimplicit-import-qualified
-fshow-warning-groups
@@ -54,6 +63,9 @@ with the following modifiers:
GHCi-specific dynamic flag settings:
other dynamic, non-language, flag settings:
-fno-diagnostics-show-caret
+ -fexternal-dynamic-refs
+ -fignore-optim-changes
+ -fignore-hpc-changes
-fno-ghci-history
-fimplicit-import-qualified
-fshow-warning-groups
diff --git a/testsuite/tests/ghci/scripts/T9293.stdout-mingw32 b/testsuite/tests/ghci/scripts/T9293.stdout-mingw32
new file mode 100644
index 0000000000..c5be11aa58
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T9293.stdout-mingw32
@@ -0,0 +1,70 @@
+options currently set: none.
+base language is: Haskell2010
+with the following modifiers:
+ -XNoDatatypeContexts
+ -XNondecreasingIndentation
+GHCi-specific dynamic flag settings:
+other dynamic, non-language, flag settings:
+ -fno-diagnostics-show-caret
+ -fignore-optim-changes
+ -fignore-hpc-changes
+ -fno-ghci-history
+ -fimplicit-import-qualified
+ -fshow-warning-groups
+warning settings:
+Should fail, GADTs is not enabled
+options currently set: none.
+base language is: Haskell2010
+with the following modifiers:
+ -XNoDatatypeContexts
+ -XGADTSyntax
+ -XGADTs
+ -XMonoLocalBinds
+ -XNondecreasingIndentation
+GHCi-specific dynamic flag settings:
+other dynamic, non-language, flag settings:
+ -fno-diagnostics-show-caret
+ -fignore-optim-changes
+ -fignore-hpc-changes
+ -fno-ghci-history
+ -fimplicit-import-qualified
+ -fshow-warning-groups
+warning settings:
+Should work, GADTs is in force from :set
+options currently set: none.
+base language is: Haskell2010
+with the following modifiers:
+ -XNoDatatypeContexts
+ -XGADTSyntax
+ -XMonoLocalBinds
+ -XNondecreasingIndentation
+GHCi-specific dynamic flag settings:
+other dynamic, non-language, flag settings:
+ -fno-diagnostics-show-caret
+ -fignore-optim-changes
+ -fignore-hpc-changes
+ -fno-ghci-history
+ -fimplicit-import-qualified
+ -fshow-warning-groups
+warning settings:
+Should fail, GADTs is now disabled
+base language is: Haskell2010
+with the following modifiers:
+ -XNoDatatypeContexts
+ -XExtendedDefaultRules
+ -XGADTSyntax
+ -XGADTs
+ -XMonoLocalBinds
+ -XNoMonomorphismRestriction
+ -XNondecreasingIndentation
+GHCi-specific dynamic flag settings:
+other dynamic, non-language, flag settings:
+ -fno-diagnostics-show-caret
+ -fignore-optim-changes
+ -fignore-hpc-changes
+ -fno-ghci-history
+ -fimplicit-import-qualified
+ -fshow-warning-groups
+warning settings:
+Should fail, GADTs is only enabled at the prompt
+C :: T Int
diff --git a/testsuite/tests/ghci/scripts/T9881.stdout b/testsuite/tests/ghci/scripts/T9881.stdout
index 18fa4d521f..68acea7c61 100644
--- a/testsuite/tests/ghci/scripts/T9881.stdout
+++ b/testsuite/tests/ghci/scripts/T9881.stdout
@@ -9,6 +9,8 @@ instance Monoid Data.ByteString.Lazy.ByteString
-- Defined in ‘Data.ByteString.Lazy.Internal’
instance Ord Data.ByteString.Lazy.ByteString
-- Defined in ‘Data.ByteString.Lazy.Internal’
+instance Semigroup Data.ByteString.Lazy.ByteString
+ -- Defined in ‘Data.ByteString.Lazy.Internal’
instance Show Data.ByteString.Lazy.ByteString
-- Defined in ‘Data.ByteString.Lazy.Internal’
instance Read Data.ByteString.Lazy.ByteString
@@ -26,6 +28,8 @@ instance Monoid Data.ByteString.ByteString
-- Defined in ‘Data.ByteString.Internal’
instance Ord Data.ByteString.ByteString
-- Defined in ‘Data.ByteString.Internal’
+instance Semigroup Data.ByteString.ByteString
+ -- Defined in ‘Data.ByteString.Internal’
instance Show Data.ByteString.ByteString
-- Defined in ‘Data.ByteString.Internal’
instance Read Data.ByteString.ByteString
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index 8c3a2f55ee..290c274a94 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -1,5 +1,12 @@
# coding=utf8
+# Note [Disabling ghci-leak-check]
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# The -fno-ghci-leak-check is because this test prints the current GHC settings
+# and the ghci-leak-check is turned off in DEBUG mode. See #15372. So we need to
+# turn it off in non-DEBUG mode, too, so that one stdout works for both modes.
+# After #15372 is fully fixed, these "extra_hc_opts" should be removed.
+
test('ghci001', combined_output, ghci_script, ['ghci001.script'])
test('ghci002', combined_output, ghci_script, ['ghci002.script'])
test('ghci003', combined_output, ghci_script, ['ghci003.script'])
@@ -91,7 +98,9 @@ test('ghci056',
extra_run_opts('ghci056_c.o')],
ghci_script, ['ghci056.script'])
-test('ghci057', normal, ghci_script, ['ghci057.script'])
+test('ghci057', extra_hc_opts("-fno-ghci-leak-check"), ghci_script, ['ghci057.script'])
+ # See Note [Disabling ghci-leak-check]
+
test('ghci060', normal, ghci_script, ['ghci060.script'])
test('ghci061', normal, ghci_script, ['ghci061.script'])
test('ghci062', [extra_files(['ghci062/', 'ghci062/Test.hs']),
@@ -115,7 +124,7 @@ test('T4087', normal, ghci_script, ['T4087.script'])
test('T4015', normal, ghci_script, ['T4015.script'])
test('T4127', normal, ghci_script, ['T4127.script'])
test('T4127a', normal, ghci_script, ['T4127a.script'])
-test('T4316', reqlib('mtl'), ghci_script, ['T4316.script'])
+test('T4316', normal, ghci_script, ['T4316.script'])
test('T4832', normal, ghci_script, ['T4832.script'])
test('T5045', normal, ghci_script, ['T5045.script'])
test('T5130', normal, ghci_script, ['T5130.script'])
@@ -190,7 +199,10 @@ test('T9181', normal, ghci_script, ['T9181.script'])
test('T9086b', normal, ghci_script, ['T9086b.script'])
test('T9140', combined_output, ghci_script, ['T9140.script'])
test('T9658', normal, ghci_script, ['T9658.script'])
-test('T9293', extra_files(['ghci057.hs']), ghci_script, ['T9293.script'])
+
+test('T9293', [extra_hc_opts('-fno-ghci-leak-check'), extra_files(['ghci057.hs'])], ghci_script, ['T9293.script'])
+ # See Note [Disabling ghci-leak-check]
+
test('T9762',
[ unless(have_dynamic(),skip)
, pre_cmd('$MAKE -s --no-print-directory T9762_prep')
@@ -201,6 +213,7 @@ test('T9878', [], ghci_script, ['T9878.script'])
test('T9878b', [extra_run_opts('-fobject-code')], ghci_script,
['T9878b.script'])
test('T10018', normal, ghci_script, ['T10018.script'])
+test('T10059', normal, ghci_script, ['T10059.script'])
test('T10122', normal, ghci_script, ['T10122.script'])
test('T10321', normal, ghci_script, ['T10321.script'])
@@ -238,14 +251,16 @@ test('T11376', normal, ghci_script, ['T11376.script'])
test('T12007', normal, ghci_script, ['T12007.script'])
test('T11975', normal, ghci_script, ['T11975.script'])
test('T10963', normal, ghci_script, ['T10963.script'])
-test('T11547', normal, ghci_script, ['T11547.script'])
+test('T11721', normal, ghci_script, ['T11721.script'])
+test('T12023', normal, run_command,
+ ['$MAKE -s --no-print-directory T12023'])
test('T12520', normal, ghci_script, ['T12520.script'])
-test('T12091',
- [expect_broken(12091), extra_run_opts('-fobject-code')],
- ghci_script, ['T12091.script'])
+test('T12091', [extra_run_opts('-fobject-code')], ghci_script,
+ ['T12091.script'])
test('T12523', normal, ghci_script, ['T12523.script'])
test('T12024', normal, ghci_script, ['T12024.script'])
-test('T12447', expect_broken(12447), ghci_script, ['T12447.script'])
+test('T12158', expect_broken(12158), ghci_script, ['T12158.script'])
+test('T12447', normal, ghci_script, ['T12447.script'])
test('T10249', normal, ghci_script, ['T10249.script'])
test('T12550', normal, ghci_script, ['T12550.script'])
test('StaticPtr', normal, ghci_script, ['StaticPtr.script'])
@@ -257,3 +272,15 @@ test('T13466', normal, ghci_script, ['T13466.script'])
test('GhciCurDir', normal, ghci_script, ['GhciCurDir.script'])
test('T13591', expect_broken(13591), ghci_script, ['T13591.script'])
test('T13699', normal, ghci_script, ['T13699.script'])
+test('T13988', normal, ghci_script, ['T13988.script'])
+test('T13407', normal, ghci_script, ['T13407.script'])
+test('T13963', normal, ghci_script, ['T13963.script'])
+test('T14342', [extra_hc_opts("-XOverloadedStrings -XRebindableSyntax")],
+ ghci_script, ['T14342.script'])
+test('T14676', extra_files(['../prog002']), ghci_script, ['T14676.script'])
+test('T14796', normal, ghci_script, ['T14796.script'])
+test('T14969', normal, ghci_script, ['T14969.script'])
+test('T15259', normal, ghci_script, ['T15259.script'])
+test('T15341', normal, ghci_script, ['T15341.script'])
+test('T15568', normal, ghci_script, ['T15568.script'])
+test('T15325', normal, ghci_script, ['T15325.script'])
diff --git a/testsuite/tests/ghci/scripts/ghci008.stdout b/testsuite/tests/ghci/scripts/ghci008.stdout
index f27edfbf25..6c105eb731 100644
--- a/testsuite/tests/ghci/scripts/ghci008.stdout
+++ b/testsuite/tests/ghci/scripts/ghci008.stdout
@@ -35,5 +35,5 @@ class (RealFrac a, Floating a) => RealFloat a where
-- Defined in ‘GHC.Float’
instance RealFloat Float -- Defined in ‘GHC.Float’
instance RealFloat Double -- Defined in ‘GHC.Float’
-base-4.10.0.0:Data.OldList.isPrefixOf :: Eq a => [a] -> [a] -> Bool
- -- Defined in ‘base-4.10.0.0:Data.OldList’
+base-4.12.0.0:Data.OldList.isPrefixOf :: Eq a => [a] -> [a] -> Bool
+ -- Defined in ‘base-4.12.0.0:Data.OldList’
diff --git a/testsuite/tests/ghci/scripts/ghci011.stdout b/testsuite/tests/ghci/scripts/ghci011.stdout
index 372930d66d..7bd58dcc24 100644
--- a/testsuite/tests/ghci/scripts/ghci011.stdout
+++ b/testsuite/tests/ghci/scripts/ghci011.stdout
@@ -5,6 +5,7 @@ instance Functor [] -- Defined in ‘GHC.Base’
instance Monad [] -- Defined in ‘GHC.Base’
instance Monoid [a] -- Defined in ‘GHC.Base’
instance Ord a => Ord [a] -- Defined in ‘GHC.Classes’
+instance Semigroup [a] -- Defined in ‘GHC.Base’
instance Show a => Show [a] -- Defined in ‘GHC.Show’
instance Read a => Read [a] -- Defined in ‘GHC.Read’
instance Foldable [] -- Defined in ‘Data.Foldable’
@@ -13,6 +14,7 @@ data () = () -- Defined in ‘GHC.Tuple’
instance Eq () -- Defined in ‘GHC.Classes’
instance Monoid () -- Defined in ‘GHC.Base’
instance Ord () -- Defined in ‘GHC.Classes’
+instance Semigroup () -- Defined in ‘GHC.Base’
instance Show () -- Defined in ‘GHC.Show’
instance Read () -- Defined in ‘GHC.Read’
instance Enum () -- Defined in ‘GHC.Enum’
@@ -25,6 +27,8 @@ instance Monoid a => Monad ((,) a) -- Defined in ‘GHC.Base’
instance (Monoid a, Monoid b) => Monoid (a, b)
-- Defined in ‘GHC.Base’
instance (Ord a, Ord b) => Ord (a, b) -- Defined in ‘GHC.Classes’
+instance (Semigroup a, Semigroup b) => Semigroup (a, b)
+ -- Defined in ‘GHC.Base’
instance (Show a, Show b) => Show (a, b) -- Defined in ‘GHC.Show’
instance (Read a, Read b) => Read (a, b) -- Defined in ‘GHC.Read’
instance Foldable ((,) a) -- Defined in ‘Data.Foldable’
diff --git a/testsuite/tests/ghci/scripts/ghci020.stdout b/testsuite/tests/ghci/scripts/ghci020.stdout
index 3995bc0b20..6ae0c4ccfe 100644
--- a/testsuite/tests/ghci/scripts/ghci020.stdout
+++ b/testsuite/tests/ghci/scripts/ghci020.stdout
@@ -1,6 +1,7 @@
data (->) (a :: TYPE q) (b :: TYPE r) -- Defined in ‘GHC.Prim’
-infixr 0 `(->)`
+infixr 0 ->
instance Applicative ((->) a) -- Defined in ‘GHC.Base’
instance Functor ((->) r) -- Defined in ‘GHC.Base’
instance Monad ((->) r) -- Defined in ‘GHC.Base’
instance Monoid b => Monoid (a -> b) -- Defined in ‘GHC.Base’
+instance Semigroup b => Semigroup (a -> b) -- Defined in ‘GHC.Base’
diff --git a/testsuite/tests/ghci/scripts/ghci024.stdout b/testsuite/tests/ghci/scripts/ghci024.stdout
index 978b6f9205..f38393bad4 100644
--- a/testsuite/tests/ghci/scripts/ghci024.stdout
+++ b/testsuite/tests/ghci/scripts/ghci024.stdout
@@ -7,6 +7,9 @@ with the following modifiers:
GHCi-specific dynamic flag settings:
other dynamic, non-language, flag settings:
-fno-diagnostics-show-caret
+ -fexternal-dynamic-refs
+ -fignore-optim-changes
+ -fignore-hpc-changes
-fno-ghci-history
-fimplicit-import-qualified
-fshow-warning-groups
diff --git a/testsuite/tests/ghci/scripts/ghci024.stdout-mingw32 b/testsuite/tests/ghci/scripts/ghci024.stdout-mingw32
new file mode 100644
index 0000000000..1247616719
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/ghci024.stdout-mingw32
@@ -0,0 +1,40 @@
+~~~~~~~~~~ Testing :set
+options currently set: none.
+base language is: Haskell2010
+with the following modifiers:
+ -XNoDatatypeContexts
+ -XNondecreasingIndentation
+GHCi-specific dynamic flag settings:
+other dynamic, non-language, flag settings:
+ -fno-diagnostics-show-caret
+ -fignore-optim-changes
+ -fignore-hpc-changes
+ -fno-ghci-history
+ -fimplicit-import-qualified
+ -fshow-warning-groups
+warning settings:
+~~~~~~~~~~ Testing :set -a
+options currently set: none.
+base language is: Haskell2010
+all active language options:
+GHCi-specific dynamic flag settings:
+ -fno-print-explicit-foralls
+other dynamic, non-language, flag settings:
+warning settings:
+ -Wno-implicit-prelude
+~~~~~~~~~~ Testing :show languages
+base language is: Haskell2010
+with the following modifiers:
+ -XNoDatatypeContexts
+ -XNondecreasingIndentation
+~~~~~~~~~~ Testing :show languages, with -XMagicHash
+base language is: Haskell2010
+with the following modifiers:
+ -XNoDatatypeContexts
+ -XMagicHash
+ -XNondecreasingIndentation
+~~~~~~~~~~ Testing :show packages
+active package flags: none
+~~~~~~~~~~ Testing :show packages, including the ghc package
+active package flags:
+ -package ghc
diff --git a/testsuite/tests/ghci/scripts/ghci025.stdout b/testsuite/tests/ghci/scripts/ghci025.stdout
index d660d233cd..e5638b07e9 100644
--- a/testsuite/tests/ghci/scripts/ghci025.stdout
+++ b/testsuite/tests/ghci/scripts/ghci025.stdout
@@ -8,18 +8,18 @@ class C a 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
+c3 :: C a b => a -> b
+c4 :: C a b => a1 -> b
-- imported via Control.Monad
class (GHC.Base.Alternative m, Monad m) => MonadPlus (m :: * -> *)
...
-mplus :: MonadPlus m => forall a. m a -> m a -> m a
-mzero :: MonadPlus m => forall a. m a
+mplus :: MonadPlus m => m a -> m a -> m a
+mzero :: MonadPlus m => 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
+(>>) :: Monad m => m a -> m b -> m b
+(>>=) :: Monad m => m a -> (a -> m b) -> m b
+fail :: Monad m => GHC.Base.String -> m a
+return :: Monad m => a -> m a
-- imported via Control.Monad, Prelude, T
class GHC.Base.Applicative m => Monad (m :: * -> *)
...
@@ -43,8 +43,7 @@ Nothing :: Maybe a
class Eq a
...
-- imported via Prelude, T
-Prelude.length ::
- Data.Foldable.Foldable t => forall a. t a -> GHC.Types.Int
+Prelude.length :: Data.Foldable.Foldable t => t a -> GHC.Types.Int
-- imported via T
data T.Integer = ...
T.length :: Data.ByteString.Internal.ByteString -> GHC.Types.Int
@@ -57,8 +56,8 @@ class C a 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
+c3 :: C a b => a -> b
+c4 :: C a b => a1 -> b
:browse! T -- with -fprint-explicit-foralls
-- defined locally
T.length :: T.Integer
@@ -68,8 +67,8 @@ class C a 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
+c3 :: forall a b a. C a b => a -> b
+c4 :: forall a b a1. C a b => a1 -> b
-- test :browse! <target> relative to different contexts
:browse! Ghci025C -- from *Ghci025C>
-- defined locally
@@ -94,4 +93,3 @@ 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/ghci030.stdout b/testsuite/tests/ghci/scripts/ghci030.stdout
index 9344bc39bd..49ce606456 100644
--- a/testsuite/tests/ghci/scripts/ghci030.stdout
+++ b/testsuite/tests/ghci/scripts/ghci030.stdout
@@ -1,6 +1,2 @@
-data D where
- C :: (Int -> a) -> Char -> D
- -- Defined at ghci030.hs:8:1
-data D where
- C :: (Int -> a) -> Char -> D
- -- Defined at ghci030.hs:8:10
+data D = forall a. C (Int -> a) Char -- Defined at ghci030.hs:8:1
+data D = forall a. C (Int -> a) Char -- Defined at ghci030.hs:8:10
diff --git a/testsuite/tests/ghci/scripts/ghci057.stderr b/testsuite/tests/ghci/scripts/ghci057.stderr
index 77cf2da0ec..4a72589688 100644
--- a/testsuite/tests/ghci/scripts/ghci057.stderr
+++ b/testsuite/tests/ghci/scripts/ghci057.stderr
@@ -1,19 +1,19 @@
<interactive>:4:1: error:
• Illegal generalised algebraic data declaration for ‘T’
- (Use GADTs to allow GADTs)
+ (Enable the GADTs extension to allow this)
• In the data declaration for ‘T’
ghci057.hs:3:3: error:
• Data constructor ‘C’ has existential type variables, a context, or a specialised result type
C :: T Int
- (Use ExistentialQuantification or GADTs to allow this)
+ (Enable ExistentialQuantification or GADTs to allow this)
• In the definition of data constructor ‘C’
In the data type declaration for ‘T’
ghci057.hs:3:3: error:
• Data constructor ‘C’ has existential type variables, a context, or a specialised result type
C :: T Int
- (Use ExistentialQuantification or GADTs to allow this)
+ (Enable ExistentialQuantification or GADTs to allow this)
• In the definition of data constructor ‘C’
In the data type declaration for ‘T’
diff --git a/testsuite/tests/ghci/scripts/ghci057.stdout b/testsuite/tests/ghci/scripts/ghci057.stdout
index b2de5417a2..2e5adc404c 100644
--- a/testsuite/tests/ghci/scripts/ghci057.stdout
+++ b/testsuite/tests/ghci/scripts/ghci057.stdout
@@ -6,6 +6,9 @@ with the following modifiers:
GHCi-specific dynamic flag settings:
other dynamic, non-language, flag settings:
-fno-diagnostics-show-caret
+ -fexternal-dynamic-refs
+ -fignore-optim-changes
+ -fignore-hpc-changes
-fno-ghci-history
-fimplicit-import-qualified
-fshow-warning-groups
@@ -22,6 +25,9 @@ with the following modifiers:
GHCi-specific dynamic flag settings:
other dynamic, non-language, flag settings:
-fno-diagnostics-show-caret
+ -fexternal-dynamic-refs
+ -fignore-optim-changes
+ -fignore-hpc-changes
-fno-ghci-history
-fimplicit-import-qualified
-fshow-warning-groups
@@ -37,6 +43,9 @@ with the following modifiers:
GHCi-specific dynamic flag settings:
other dynamic, non-language, flag settings:
-fno-diagnostics-show-caret
+ -fexternal-dynamic-refs
+ -fignore-optim-changes
+ -fignore-hpc-changes
-fno-ghci-history
-fimplicit-import-qualified
-fshow-warning-groups
@@ -54,6 +63,9 @@ with the following modifiers:
GHCi-specific dynamic flag settings:
other dynamic, non-language, flag settings:
-fno-diagnostics-show-caret
+ -fexternal-dynamic-refs
+ -fignore-optim-changes
+ -fignore-hpc-changes
-fno-ghci-history
-fimplicit-import-qualified
-fshow-warning-groups
diff --git a/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32 b/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32
new file mode 100644
index 0000000000..c5be11aa58
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/ghci057.stdout-mingw32
@@ -0,0 +1,70 @@
+options currently set: none.
+base language is: Haskell2010
+with the following modifiers:
+ -XNoDatatypeContexts
+ -XNondecreasingIndentation
+GHCi-specific dynamic flag settings:
+other dynamic, non-language, flag settings:
+ -fno-diagnostics-show-caret
+ -fignore-optim-changes
+ -fignore-hpc-changes
+ -fno-ghci-history
+ -fimplicit-import-qualified
+ -fshow-warning-groups
+warning settings:
+Should fail, GADTs is not enabled
+options currently set: none.
+base language is: Haskell2010
+with the following modifiers:
+ -XNoDatatypeContexts
+ -XGADTSyntax
+ -XGADTs
+ -XMonoLocalBinds
+ -XNondecreasingIndentation
+GHCi-specific dynamic flag settings:
+other dynamic, non-language, flag settings:
+ -fno-diagnostics-show-caret
+ -fignore-optim-changes
+ -fignore-hpc-changes
+ -fno-ghci-history
+ -fimplicit-import-qualified
+ -fshow-warning-groups
+warning settings:
+Should work, GADTs is in force from :set
+options currently set: none.
+base language is: Haskell2010
+with the following modifiers:
+ -XNoDatatypeContexts
+ -XGADTSyntax
+ -XMonoLocalBinds
+ -XNondecreasingIndentation
+GHCi-specific dynamic flag settings:
+other dynamic, non-language, flag settings:
+ -fno-diagnostics-show-caret
+ -fignore-optim-changes
+ -fignore-hpc-changes
+ -fno-ghci-history
+ -fimplicit-import-qualified
+ -fshow-warning-groups
+warning settings:
+Should fail, GADTs is now disabled
+base language is: Haskell2010
+with the following modifiers:
+ -XNoDatatypeContexts
+ -XExtendedDefaultRules
+ -XGADTSyntax
+ -XGADTs
+ -XMonoLocalBinds
+ -XNoMonomorphismRestriction
+ -XNondecreasingIndentation
+GHCi-specific dynamic flag settings:
+other dynamic, non-language, flag settings:
+ -fno-diagnostics-show-caret
+ -fignore-optim-changes
+ -fignore-hpc-changes
+ -fno-ghci-history
+ -fimplicit-import-qualified
+ -fshow-warning-groups
+warning settings:
+Should fail, GADTs is only enabled at the prompt
+C :: T Int
diff --git a/testsuite/tests/ghci/scripts/ghci058.stdout b/testsuite/tests/ghci/scripts/ghci058.stdout
index 2028aee7fa..83c8bbd8cc 100644
--- a/testsuite/tests/ghci/scripts/ghci058.stdout
+++ b/testsuite/tests/ghci/scripts/ghci058.stdout
@@ -1,4 +1,4 @@
-Ok, 1 module loaded.
+Ok, one module loaded.
'a'
-Ok, 1 module loaded.
+Ok, one module loaded.
'b'