[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36
John Goerzen
jgoerzen at complete.org
Fri Apr 23 15:17:51 UTC 2010
The following commit has been merged in the master branch:
commit 9e66587d0855f0e00d4f129383f8b16b7b284772
Author: John Goerzen <jgoerzen at complete.org>
Date: Sun Dec 3 10:01:45 2006 +0100
Renamed MissingH.Network.FTP.Client to Network.FTP.Client, refs #1
diff --git a/MissingH.cabal b/MissingH.cabal
index 54b6535..8da2c8c 100644
--- a/MissingH.cabal
+++ b/MissingH.cabal
@@ -27,7 +27,7 @@ Exposed-Modules: MissingH.Str, System.IO, System.IO.Binary, Data.List.Utils,
MissingH.Path.FilePath, MissingH.Path.WildMatch, MissingH.Path.Glob,
MissingH.Time, MissingH.Time.ParseDate,
MissingH.Network,
- MissingH.Network.FTP.Client,
+ Network.FTP.Client,
Network.FTP.Client.Parser,
MissingH.Network.FTP.Server,
MissingH.Network.FTP.ParserServer,
diff --git a/MissingH/Network/FTP/Client.hs b/src/Network/FTP/Client.hs
similarity index 94%
rename from MissingH/Network/FTP/Client.hs
rename to src/Network/FTP/Client.hs
index 608c21d..7af4717 100644
--- a/MissingH/Network/FTP/Client.hs
+++ b/src/Network/FTP/Client.hs
@@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-}
{- |
- Module : MissingH.Network.FTP.Client
+ Module : Network.FTP.Client
Copyright : Copyright (C) 2004-2005 John Goerzen
License : GNU GPL, version 2 or above
@@ -38,7 +38,7 @@ session with ghci:
(This would be similar in a "do" block. You could also save it to a file and
run that with Hugs.)
-> Prelude> :l MissingH.Network.FTP.Client
+> Prelude> :l Network.FTP.Client
> ...
The above loads the module.
@@ -46,16 +46,16 @@ The above loads the module.
Next, we enable the debugging. This will turn on all the @FTP sent@ and
@FTP received@ messages you'll see.
-> Prelude MissingH.Network.FTP.Client> enableFTPDebugging
+> Prelude Network.FTP.Client> enableFTPDebugging
Now, connect to the server on @ftp.kernel.org at .
-> *MissingH.Network.FTP.Client> h <- easyConnectFTP "ftp.kernel.org"
+> *Network.FTP.Client> h <- easyConnectFTP "ftp.kernel.org"
> FTP received: 220 Welcome to ftp.kernel.org.
And log in anonymously.
-> *MissingH.Network.FTP.Client> loginAnon h
+> *Network.FTP.Client> loginAnon h
> FTP sent: USER anonymous
> FTP received: 331 Please specify the password.
> FTP sent: PASS anonymous@
@@ -64,7 +64,7 @@ And log in anonymously.
Change the directory...
-> Prelude MissingH.Network.FTP.Client> cwd h "/pub/linux/kernel/Historic"
+> Prelude Network.FTP.Client> cwd h "/pub/linux/kernel/Historic"
> FTP sent: CWD /pub/linux/kernel/Historic
> FTP received: 250 Directory successfully changed.
@@ -72,7 +72,7 @@ Let's look at the directory. 'nlst' returns a list of strings, each string
corresponding to a filename. Here, @putStrLn . unlines@ will simply
print them out, one per line.
-> Prelude MissingH.Network.FTP.Client> nlst h Nothing >>= putStrLn . unlines
+> Prelude Network.FTP.Client> nlst h Nothing >>= putStrLn . unlines
> FTP sent: TYPE A
> FTP received: 200 Switching to ASCII mode.
> FTP sent: PASV
@@ -92,7 +92,7 @@ Let's try downloading something and print it to the screen. Again, we use
@putStrLn at . We use @fst@ here because 'getbinary' returns a tuple consisting
of a string representing the data and a 'FTPResult' code.
-> Prelude MissingH.Network.FTP.Client> getbinary h "linux-0.01.tar.gz.sign" >>= putStrLn . fst
+> Prelude Network.FTP.Client> getbinary h "linux-0.01.tar.gz.sign" >>= putStrLn . fst
> FTP sent: TYPE I
> FTP received: 200 Switching to Binary mode.
> FTP sent: PASV
@@ -111,7 +111,7 @@ of a string representing the data and a 'FTPResult' code.
Here's an example showing you what the result code looks like.
-> Prelude MissingH.Network.FTP.Client> getbinary h "linux-0.01.tar.gz.sign" >>= print . snd
+> Prelude Network.FTP.Client> getbinary h "linux-0.01.tar.gz.sign" >>= print . snd
> ...
> (226,["File send OK."])
@@ -120,7 +120,7 @@ the server. The second component is a list of message lines from the server.
Now, let's get a more detailed directory listing:
-> Prelude MissingH.Network.FTP.Client> dir h Nothing >>= putStrLn . unlines
+> Prelude Network.FTP.Client> dir h Nothing >>= putStrLn . unlines
> ...
> -r--r--r-- 1 536 536 63362 Oct 30 1993 linux-0.01.tar.bz2
> -r--r--r-- 1 536 536 248 Oct 30 1993 linux-0.01.tar.bz2.sign
@@ -133,7 +133,7 @@ Now, let's get a more detailed directory listing:
And finally, log out:
-> Prelude MissingH.Network.FTP.Client> quit h
+> Prelude Network.FTP.Client> quit h
> FTP sent: QUIT
> FTP received: 221 Goodbye.
@@ -167,7 +167,7 @@ commands themselves./
This will be fairly rare. Just be aware of this.
-This module logs messages under @MissingH.Network.FTP.Client@ for outgoing
+This module logs messages under @Network.FTP.Client@ for outgoing
traffic and @Network.FTP.Client.Parser@ for incoming traffic, all with the
'System.Log.DEBUG' priority, so by default, no log messages are seen.
The 'enableFTPDebugging' function will adjust the priorities of these
@@ -198,7 +198,7 @@ Useful standards:
-}
-module MissingH.Network.FTP.Client(-- * Establishing\/Removing connections
+module Network.FTP.Client(-- * Establishing\/Removing connections
easyConnectFTP, connectFTP,
loginAnon, login, quit,
-- * Configuration
@@ -241,7 +241,7 @@ getresp h = do
debugParseGoodReply c
-logsend m = debugM "MissingH.Network.FTP.Client" ("FTP sent: " ++ m)
+logsend m = debugM "Network.FTP.Client" ("FTP sent: " ++ m)
sendcmd h c = do logsend c
hPutStr (writeh h) (c ++ "\r\n")
getresp h
@@ -255,7 +255,7 @@ easyConnectFTP h = do x <- connectFTP h 21
{- | Enable logging of FTP messages through 'System.Log.Logger'.
This sets the log levels of @Network.FTP.Client.Parser@ and
- at MissingH.Network.FTP.Client@ to DEBUG. By default, this means that
+ at Network.FTP.Client@ to DEBUG. By default, this means that
full protocol dumps will be sent to stderr.
The effect is global and persists until changed.
@@ -264,7 +264,7 @@ enableFTPDebugging :: IO ()
enableFTPDebugging =
do
updateGlobalLogger "Network.FTP.Client.Parser" (setLevel DEBUG)
- updateGlobalLogger "MissingH.Network.FTP.Client" (setLevel DEBUG)
+ updateGlobalLogger "Network.FTP.Client" (setLevel DEBUG)
{- | Connect to remote FTP server and read the welcome. -}
connectFTP :: Network.HostName -> PortNumber -> IO (FTPConnection, FTPResult)
diff --git a/src/Network/FTP/Client/Parser.hs b/src/Network/FTP/Client/Parser.hs
index 1bd0ae5..5152baa 100644
--- a/src/Network/FTP/Client/Parser.hs
+++ b/src/Network/FTP/Client/Parser.hs
@@ -26,8 +26,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Portability: systems with networking
This module provides a parser that is used internally by
-"MissingH.Network.FTP.Client". You almost certainly do not want to use
-this module directly. Use "MissingH.Network.FTP.Client" instead.
+"Network.FTP.Client". You almost certainly do not want to use
+this module directly. Use "Network.FTP.Client" instead.
Written by John Goerzen, jgoerzen\@complete.org
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list