summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/Main.lhs14
1 files changed, 3 insertions, 11 deletions
diff --git a/examples/Main.lhs b/examples/Main.lhs
index 1a7b5b12..4d1c4eef 100644
--- a/examples/Main.lhs
+++ b/examples/Main.lhs
@@ -1,28 +1,20 @@
1A very helpful and literate comment.
2A very helpful comment for very helpful and very literate comment.
3
4> module Main (main) where 1> module Main (main) where
5 2>
6> import Control.Monad 3> import Control.Monad
7> import Network.BitTorrent 4> import Network.BitTorrent
8> import System.Environment 5> import System.Environment
9> import Control.Monad.Trans 6> import Control.Monad.Trans
10 7>
11 8>
12> main :: IO () 9> main :: IO ()
13> main = do 10> main = do
14> [path] <- getArgs 11> [path] <- getArgs
15> torrent <- fromFile path 12> torrent <- fromFile path
16>
17> print (contentLayout "./" (tInfo torrent)) 13> print (contentLayout "./" (tInfo torrent))
18>
19> client <- newClient 2 [] 14> client <- newClient 2 []
20> swarm <- newLeecher client torrent 15> swarm <- newLeecher client torrent
21>
22> storage <- swarm `bindTo` "/tmp/" 16> storage <- swarm `bindTo` "/tmp/"
23>
24> ppStorage storage >>= print 17> ppStorage storage >>= print
25>
26> discover swarm $ do 18> discover swarm $ do
27> liftIO $ print "connected to peer" 19> liftIO $ print "connected to peer"
28> forever $ do 20> forever $ do