From 0504cd08b58b05f473b87607d20a606ee4dc210b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Facundo=20Dom=C3=ADnguez?= <facundominguez@gmail.com>
Date: Tue, 22 Aug 2023 18:58:11 +0000
Subject: [PATCH] Fix typos in the documentation of Data.OldList.permutations

---
 libraries/base/Data/OldList.hs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libraries/base/Data/OldList.hs b/libraries/base/Data/OldList.hs
index b4b6ebc4429f..001af57825c4 100644
--- a/libraries/base/Data/OldList.hs
+++ b/libraries/base/Data/OldList.hs
@@ -1548,13 +1548,13 @@ permutations xs0 = xs0 : perms xs0 []
     -- | @perms ts is@ is equivalent to
     --
     -- > concat
-    -- >   [ interleave {(ts!!n)} {(drop (n+1)} ts) xs []
+    -- >   [ interleave {(ts!!n)} {(drop (n+1) ts)} xs []
     -- >   | n <- [0..length ts - 1]
     -- >   , xs <- permutations (reverse (take n ts) ++ is)
     -- >   ]
     --
-    -- @{(ts!!n)}@ and @{(drop (n+1)}@ denote the values of variables @t@ and @ts@ which
-    -- appear free in the definition of @interleave@ and @interleave'@.
+    -- @{(ts!!n)}@ and @{(drop (n+1) ts)}@ denote the values of variables @t@ and @ts@
+    -- when they appear free in the definition of @interleave@ and @interleave'@.
     perms :: forall a. [a] -> [a] -> [[a]]
     perms []     _  = []
     perms (t:ts) is = foldr interleave (perms ts (t:is)) (permutations is)
@@ -1570,7 +1570,7 @@ permutations xs0 = xs0 : perms xs0 []
         interleave :: [a] -> [[a]] -> [[a]]
         interleave xs r = let (_,zs) = interleave' id xs r in zs
 
-        -- @interleave' f ys r@ is equivalent to
+        -- @interleave' {t} {ts} f ys r@ is equivalent to
         --
         -- > ( ys ++ ts
         -- > , [ f (insertAt n t ys ++ ts) | n <- [0..length ys - 1] ] ++ r
-- 
GitLab