diff options
author | Sam T <pxqr.sta@gmail.com> | 2013-06-11 06:00:57 +0400 |
---|---|---|
committer | Sam T <pxqr.sta@gmail.com> | 2013-06-11 06:00:57 +0400 |
commit | 1b4fdf35dd6c21d600130c42a1bcb5c56b25afa6 (patch) | |
tree | 136bb1467f5d3b5929620ddb0ab2adffc656504d /exsamples | |
parent | a6490c275b6c688df1f654bff92f96aaeb998805 (diff) |
~ Use exception in fromFile.
Again, the problem is that one function returns errors in two different
ways: Either and IO exceptions. It's better to just throw exception in
either case.
Diffstat (limited to 'exsamples')
-rw-r--r-- | exsamples/Main.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/exsamples/Main.hs b/exsamples/Main.hs index 3a347ab6..b0224886 100644 --- a/exsamples/Main.hs +++ b/exsamples/Main.hs | |||
@@ -8,7 +8,7 @@ import System.Environment | |||
8 | main :: IO () | 8 | main :: IO () |
9 | main = do | 9 | main = do |
10 | [path] <- getArgs | 10 | [path] <- getArgs |
11 | Right torrent <- fromFile path | 11 | torrent <- fromFile path |
12 | 12 | ||
13 | client <- newClient [] | 13 | client <- newClient [] |
14 | swarm <- newLeacher client torrent | 14 | swarm <- newLeacher client torrent |