[commit: ghc] wip/nfs-locking: Add splitArgs function to Base.hs. (4dd9560)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:45:54 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/4dd9560e34ded015140a7d5d4d2e22d27e19abb2/ghc

>---------------------------------------------------------------

commit 4dd9560e34ded015140a7d5d4d2e22d27e19abb2
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Tue Dec 30 17:03:10 2014 +0000

    Add splitArgs function to Base.hs.


>---------------------------------------------------------------

4dd9560e34ded015140a7d5d4d2e22d27e19abb2
 src/Base.hs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/Base.hs b/src/Base.hs
index 24943e4..a0f4303 100644
--- a/src/Base.hs
+++ b/src/Base.hs
@@ -8,7 +8,7 @@ module Base (
     module Data.List,
     Stage (..),
     Args, arg,
-    joinArgs, joinArgsWithSpaces,
+    joinArgs, joinArgsWithSpaces, splitArgs,
     filterOut
     ) where
 
@@ -40,5 +40,8 @@ joinArgsWithSpaces = intercalateArgs " "
 joinArgs :: Args -> Args
 joinArgs = intercalateArgs ""
 
+splitArgs :: Args -> Args
+splitArgs = fmap (concatMap words)
+
 filterOut :: Args -> [String] -> Args
 filterOut args list = filter (`notElem` list) <$> args



More information about the ghc-commits mailing list