From: Ramakrishnan Muthukrishnan Date: Tue, 3 Feb 2015 23:26:27 +0000 (+0530) Subject: Main program X-Git-Url: https://git.rkrishnan.org/?a=commitdiff_plain;h=00321ac50df3d8493c02f2420fb85d17ace2a38e;p=functorrent.git Main program --- diff --git a/src/Main.hs b/src/Main.hs index 4af7af8..7ab4712 100644 --- 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"