[Git][ghc/ghc][master] Fix typos in the documentation of Data.OldList.permutations

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Aug 23 21:38:33 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
0504cd08 by Facundo Domínguez at 2023-08-23T17:38:11-04:00
Fix typos in the documentation of Data.OldList.permutations
- - - - -


1 changed file:

- libraries/base/Data/OldList.hs


Changes:

=====================================
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



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0504cd08b58b05f473b87607d20a606ee4dc210b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/0504cd08b58b05f473b87607d20a606ee4dc210b
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/20230823/847a59dd/attachment-0001.html>


More information about the ghc-commits mailing list