projects
/
functorrent.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6fabd39
)
Main program
author
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Tue, 3 Feb 2015 23:26:27 +0000
(
04:56
+0530)
committer
Ramakrishnan Muthukrishnan
<ram@rkrishnan.org>
Tue, 3 Feb 2015 23:28:31 +0000
(
04:58
+0530)
src/Main.hs
patch
|
blob
|
history
diff --git
a/src/Main.hs
b/src/Main.hs
index 4af7af883e9f87d69fd1fd2f100691b2db39eaf8..7ab471258fdb0f70f9d5db6b32da77d5f69ce6c7 100644
(file)
--- a/
src/Main.hs
+++ b/
src/Main.hs
@@
-1,3
+1,12
@@
module Main where
-main = putStrLn "hello"
+import System.Environment (getArgs)
+import qualified Data.ByteString.Char8 as BC
+import qualified Bencode as Benc
+
+main :: IO ()
+main = do
+ args <- getArgs
+ torrentStr <- BC.readFile (head args)
+ let metadata = Benc.decode torrentStr
+ putStrLn "done"