From 220cbc977a252c56eea15f2254c362c0d1ea5bdf Mon Sep 17 00:00:00 2001 From: Ramakrishnan Muthukrishnan Date: Fri, 11 Sep 2015 13:33:11 +0530 Subject: [PATCH] functorrent.cabal: avoid double compilation, one for lib, another for exe --- functorrent.cabal | 12 +++++++----- src/FuncTorrent.hs | 22 ---------------------- src/{ => main}/Main.hs | 0 3 files changed, 7 insertions(+), 27 deletions(-) delete mode 100644 src/FuncTorrent.hs rename src/{ => main}/Main.hs (100%) diff --git a/functorrent.cabal b/functorrent.cabal index 2ec81bb..b663ef9 100644 --- a/functorrent.cabal +++ b/functorrent.cabal @@ -16,15 +16,16 @@ extra-source-files: README.md cabal-version: >=1.18 library - exposed-modules: FuncTorrent - FuncTorrent.Bencode, + exposed-modules: FuncTorrent.Bencode, + FuncTorrent.Fileops, FuncTorrent.Logger, FuncTorrent.Metainfo, FuncTorrent.Network FuncTorrent.Peer, - FuncTorrent.Tracker + FuncTorrent.PeerMsgs, + FuncTorrent.Tracker, + FuncTorrent.Utils - other-modules: FuncTorrent.Utils other-extensions: OverloadedStrings hs-source-dirs: src ghc-options: -Wall -fwarn-incomplete-patterns -fno-warn-orphans @@ -49,7 +50,7 @@ library executable functorrent main-is: Main.hs other-extensions: OverloadedStrings - hs-source-dirs: src + hs-source-dirs: src/main ghc-options: -Wall -fwarn-incomplete-patterns -optc-Os -fno-warn-orphans default-language: Haskell2010 build-depends: base, @@ -59,6 +60,7 @@ executable functorrent containers, cryptohash, directory, + functorrent, HTTP, mtl, network, diff --git a/src/FuncTorrent.hs b/src/FuncTorrent.hs deleted file mode 100644 index 2cded5b..0000000 --- a/src/FuncTorrent.hs +++ /dev/null @@ -1,22 +0,0 @@ -module FuncTorrent - (BVal(..), - Info(..), - Metainfo(..), - Peer, - TrackerResponse(..), - getTrackerResponse, - decode, - encode, - handlePeerMsgs, - initLogger, - logMessage, - logStop, - mkInfo, - torrentToMetainfo - ) where - -import FuncTorrent.Bencode -import FuncTorrent.Logger -import FuncTorrent.Metainfo -import FuncTorrent.Peer -import FuncTorrent.Tracker diff --git a/src/Main.hs b/src/main/Main.hs similarity index 100% rename from src/Main.hs rename to src/main/Main.hs -- 2.45.2