[Git][ghc/ghc][master] Fix #16700: Tiny errors in output of GHCi commands :forward and :info
Marge Bot
gitlab at gitlab.haskell.org
Fri Jun 7 14:22:51 UTC 2019
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
d1dc0ed7 by Roland Senn at 2019-06-07T14:22:47Z
Fix #16700: Tiny errors in output of GHCi commands :forward and :info
`:info Coercible` now outputs the correct section number of the GHCi User's guide together with the secion title.
`:forward x` gives the correct syntax hint.
- - - - -
7 changed files:
- compiler/prelude/PrelInfo.hs
- ghc/GHCi/UI.hs
- + testsuite/tests/ghci.debugger/scripts/T16700.hs
- + testsuite/tests/ghci.debugger/scripts/T16700.script
- + testsuite/tests/ghci.debugger/scripts/T16700.stdout
- testsuite/tests/ghci.debugger/scripts/all.T
- testsuite/tests/ghci/scripts/ghci059.stdout
Changes:
=====================================
compiler/prelude/PrelInfo.hs
=====================================
@@ -214,7 +214,8 @@ knownNamesInfo :: NameEnv SDoc
knownNamesInfo = unitNameEnv coercibleTyConName $
vcat [ text "Coercible is a special constraint with custom solving rules."
, text "It is not a class."
- , text "Please see section 9.14.4 of the user's guide for details." ]
+ , text "Please see section `The Coercible constraint`"
+ , text "of the user's guide for details." ]
{-
We let a lot of "non-standard" values be visible, so that we can make
=====================================
ghc/GHCi/UI.hs
=====================================
@@ -3570,7 +3570,7 @@ forwardCmd :: GhciMonad m => String -> m ()
forwardCmd arg
| null arg = forward 1
| all isDigit arg = forward (read arg)
- | otherwise = liftIO $ putStrLn "Syntax: :back [num]"
+ | otherwise = liftIO $ putStrLn "Syntax: :forward [num]"
where
forward num = withSandboxOnly ":forward" $ do
(names, ix, pan, _) <- GHC.forward num
=====================================
testsuite/tests/ghci.debugger/scripts/T16700.hs
=====================================
@@ -0,0 +1,6 @@
+qsort :: [Int] -> [Int]
+qsort [] = []
+qsort (a:as) = qsort left ++ [a] ++ qsort right
+ where (left,right) = (filter (<=a) as, filter (>a) as)
+
+main = print $ qsort [4, 1, 7, 10, 3]
=====================================
testsuite/tests/ghci.debugger/scripts/T16700.script
=====================================
@@ -0,0 +1,4 @@
+:l T16700.hs
+:break 3
+:main
+:forward x
=====================================
testsuite/tests/ghci.debugger/scripts/T16700.stdout
=====================================
@@ -0,0 +1,7 @@
+Breakpoint 0 activated at T16700.hs:3:16-47
+Stopped in Main.qsort, T16700.hs:3:16-47
+_result :: [Int] = _
+a :: Int = 4
+left :: [Int] = _
+right :: [Int] = _
+Syntax: :forward [num]
=====================================
testsuite/tests/ghci.debugger/scripts/all.T
=====================================
@@ -108,5 +108,6 @@ test('T8557', normal, ghci_script, ['T8557.script'])
test('T12458', normal, ghci_script, ['T12458.script'])
test('T13825-debugger', when(arch('powerpc64'), expect_broken(14455)),
ghci_script, ['T13825-debugger.script'])
+test('T16700', normal, ghci_script, ['T16700.script'])
test('break029', extra_files(['break029.hs']), ghci_script, ['break029.script'])
=====================================
testsuite/tests/ghci/scripts/ghci059.stdout
=====================================
@@ -1,7 +1,8 @@
{-
Coercible is a special constraint with custom solving rules.
It is not a class.
-Please see section 9.14.4 of the user's guide for details.
+Please see section `The Coercible constraint`
+of the user's guide for details.
-}
type role Coercible representational representational
class Coercible a b => Coercible (a :: k) (b :: k)
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/d1dc0ed75be0dafb0be3b4ff5e839612702eab47
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/d1dc0ed75be0dafb0be3b4ff5e839612702eab47
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190607/c8fa1023/attachment-0001.html>
More information about the ghc-commits
mailing list