diff options
| author | pb <pb@9f8f72e9-4bf4-416e-b76e-7d4203597157> | 2010-03-28 11:00:50 +0000 |
|---|---|---|
| committer | pb <pb@9f8f72e9-4bf4-416e-b76e-7d4203597157> | 2010-03-28 11:00:50 +0000 |
| commit | 6f5773590d2a1453aba3c47bcca286c4ffeb93bd (patch) | |
| tree | be510250bd3afee9167d1ec6dc4f63808b172cae | |
| parent | 08e80e41af814eb3d6bc21c72e0830f0fc1e8c6c (diff) | |
git-svn-id: https://ssl.buetow.org/repos/hsbot/trunk@48 9f8f72e9-4bf4-416e-b76e-7d4203597157
| -rw-r--r-- | HsBot/General/Render.hs (renamed from HsBot/Render.hs) | 2 | ||||
| -rw-r--r-- | HsBot/General/Tools.hs (renamed from HsBot/Tools.hs) | 2 | ||||
| -rw-r--r-- | HsBot/IRC/IRConnection.hs (renamed from HsBot/IRC/Connection.hs) | 2 | ||||
| -rw-r--r-- | HsBot/IRC/User.hs | 5 | ||||
| -rw-r--r-- | HsBot/Logics.hs | 4 | ||||
| -rw-r--r-- | HsBot/Logics/IRCKarma.hs | 27 | ||||
| -rw-r--r-- | HsBot/Start.hs | 4 | ||||
| -rw-r--r-- | HsBot/State.hs | 2 | ||||
| -rw-r--r-- | Makefile | 4 |
9 files changed, 11 insertions, 41 deletions
diff --git a/HsBot/Render.hs b/HsBot/General/Render.hs index 1dc78ba..5768942 100644 --- a/HsBot/Render.hs +++ b/HsBot/General/Render.hs @@ -1,4 +1,4 @@ -module HsBot.Render where +module HsBot.General.Render where class Render a where render :: a -> String diff --git a/HsBot/Tools.hs b/HsBot/General/Tools.hs index 6f66994..bd13271 100644 --- a/HsBot/Tools.hs +++ b/HsBot/General/Tools.hs @@ -1,4 +1,4 @@ -module HsBot.Tools where +module HsBot.General.Tools where uniq :: (Eq a) => [a] -> [a] uniq list = diff --git a/HsBot/IRC/Connection.hs b/HsBot/IRC/IRConnection.hs index c4fa7a9..610d333 100644 --- a/HsBot/IRC/Connection.hs +++ b/HsBot/IRC/IRConnection.hs @@ -10,7 +10,7 @@ import Text.Printf import HsBot.Conf import HsBot.Env import HsBot.State -import HsBot.Tools +import HsBot.General.Tools import HsBot.IRC.User data IrcMessage = IrcMessage { diff --git a/HsBot/IRC/User.hs b/HsBot/IRC/User.hs index cd6d55f..422f910 100644 --- a/HsBot/IRC/User.hs +++ b/HsBot/IRC/User.hs @@ -1,9 +1,8 @@ -module HsBot.User where +module HsBot.IRC.User where import List -import HsBot.Karma -import HsBot.Render +import HsBot.General.Render data User = User { userName :: String, diff --git a/HsBot/Logics.hs b/HsBot/Logics.hs index 5b534e5..01eda7c 100644 --- a/HsBot/Logics.hs +++ b/HsBot/Logics.hs @@ -1,10 +1,6 @@ module HsBot.Logics (logicsRun) where import HsBot.Env -import HsBot.Logics.IRCKarma - -class Logics where - logicRun :: String -> Env -> IO Env logicsRun :: String -> Env -> IO Env logicsRun str env = return (env) diff --git a/HsBot/Logics/IRCKarma.hs b/HsBot/Logics/IRCKarma.hs deleted file mode 100644 index 55c74d7..0000000 --- a/HsBot/Logics/IRCKarma.hs +++ /dev/null @@ -1,27 +0,0 @@ -module HsBot.Logics.IrcKarma where - -import HsBot.Env -import HsBot.Logics - -data Karma = Karma { - karmaName :: String, - minPts :: Int, - minPerc :: Float - } deriving (Show, Read) - -instance Eq Karma where - x == y = (minPerc x) == (minPerc y) && (minPts x == minPts y) - -instance Ord Karma where - x > y - | (minPerc x) > (minPerc y) = True - | otherwise = (minPts x) > (minPts y) - x < y - | (minPerc x) < (minPerc y) = True - | otherwise = (minPts x) < (minPts y) - x >= y = not (x < y) - x <= y = not (x > y) - -instance Logics Karma where - logicsRun str env = return (env) - diff --git a/HsBot/Start.hs b/HsBot/Start.hs index 3ea4d1e..228092a 100644 --- a/HsBot/Start.hs +++ b/HsBot/Start.hs @@ -5,10 +5,10 @@ import System import HsBot.Cmd import HsBot.Conf import HsBot.Env -import HsBot.IRC.Connection +import HsBot.IRC.IRConnection import HsBot.Logics import HsBot.State -import HsBot.Tools +import HsBot.General.Tools start :: IO () start = do diff --git a/HsBot/State.hs b/HsBot/State.hs index 93ca7ef..9d1fa87 100644 --- a/HsBot/State.hs +++ b/HsBot/State.hs @@ -3,7 +3,7 @@ module HsBot.State where import qualified Data.Map as M import List -import HsBot.User +import HsBot.IRC.User data State = State { currentChannel :: String, @@ -1,5 +1,7 @@ all: ghc --make Main.hs -o hsbot clean: - rm *.o *.hi hsbot + rm hsbot + find . -name \*.o | xargs rm + find . -name \*.hi | xargs rm |
