summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmily Martins <emily.flakeheart@gmail.com>2021-06-28 18:47:56 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-07-01 03:31:13 -0400
commitd455c39e93881dc3810ecc16a2f1bfd6c4e2fcdd (patch)
treee522af449195e507ecb9071470d42c47fce42205
parent6d712150f8f9400397368b45a152a694ba9d5af4 (diff)
downloadhaskell-d455c39e93881dc3810ecc16a2f1bfd6c4e2fcdd.tar.gz
Unify primary and secondary GHCi prompt
Fixes #20042 Signed-off-by: Emily Martins <emily.flakeheart@gmail.com> Signed-off-by: Hécate Moonlight <hecate@glitchbra.in>
-rw-r--r--docs/users_guide/ghci.rst30
-rw-r--r--ghc/GHCi/UI.hs2
2 files changed, 16 insertions, 16 deletions
diff --git a/docs/users_guide/ghci.rst b/docs/users_guide/ghci.rst
index 5ffe323f5f..7f7fded588 100644
--- a/docs/users_guide/ghci.rst
+++ b/docs/users_guide/ghci.rst
@@ -520,9 +520,9 @@ own):
.. code-block:: none
ghci> :{
- | g op n [] = n
- | g op n (h:t) = h `op` g op n t
- | :}
+ ghci| g op n [] = n
+ ghci| g op n (h:t) = h `op` g op n t
+ ghci| :}
ghci> g (*) 1 [1..3]
6
@@ -596,8 +596,8 @@ prompt. Note that layout is in effect, so to add more bindings to this
ghci> :set +m
ghci> let x = 42
- | y = 3
- |
+ ghci| y = 3
+ ghci|
ghci>
Explicit braces and semicolons can be used instead of layout:
@@ -605,9 +605,9 @@ Explicit braces and semicolons can be used instead of layout:
.. code-block:: none
ghci> do {
- | putStrLn "hello"
- | ;putStrLn "world"
- | }
+ ghci| putStrLn "hello"
+ ghci| ;putStrLn "world"
+ ghci| }
hello
world
ghci>
@@ -620,11 +620,11 @@ Multiline mode is useful when entering monadic ``do`` statements:
.. code-block:: none
ghci> flip evalStateT 0 $ do
- | i <- get
- | lift $ do
- | putStrLn "Hello World!"
- | print i
- |
+ ghci| i <- get
+ ghci| lift $ do
+ ghci| putStrLn "Hello World!"
+ ghci| print i
+ ghci|
"Hello World!"
0
ghci>
@@ -635,8 +635,8 @@ top-level prompt.
.. code-block:: none
ghci> do
- | putStrLn "Hello, World!"
- | ^C
+ ghci| putStrLn "Hello, World!"
+ ghci| ^C
ghci>
.. _ghci-decls:
diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs
index 1f5b576b6b..f861c9b82a 100644
--- a/ghc/GHCi/UI.hs
+++ b/ghc/GHCi/UI.hs
@@ -447,7 +447,7 @@ default_stop = ""
default_prompt, default_prompt_cont :: PromptFunction
default_prompt = generatePromptFunctionFromString "ghci> "
-default_prompt_cont = generatePromptFunctionFromString "| "
+default_prompt_cont = generatePromptFunctionFromString "ghci| "
default_args :: [String]
default_args = []