diff options
| author | pb <pb@9f8f72e9-4bf4-416e-b76e-7d4203597157> | 2010-03-28 21:39:32 +0000 |
|---|---|---|
| committer | pb <pb@9f8f72e9-4bf4-416e-b76e-7d4203597157> | 2010-03-28 21:39:32 +0000 |
| commit | 2341aa600daac2c8afa366cd612a893580104a93 (patch) | |
| tree | 0b5586310a11af2b07abb439a9b9ad87d69f07ac /HsBot/Base/State.hs | |
| parent | eb0ca70a636183fea73d884e20a48ac6120066bc (diff) | |
git-svn-id: https://ssl.buetow.org/repos/hsbot/trunk@55 9f8f72e9-4bf4-416e-b76e-7d4203597157
Diffstat (limited to 'HsBot/Base/State.hs')
| -rw-r--r-- | HsBot/Base/State.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/HsBot/Base/State.hs b/HsBot/Base/State.hs index c4c361a..2547501 100644 --- a/HsBot/Base/State.hs +++ b/HsBot/Base/State.hs @@ -1,3 +1,8 @@ +-- {-# LANGUAGE MultiParamTypeClasses #-} +-- {-# LANGUAGE FunctionalDependencies #-} +-- {-# LANGUAGE FlexibleInstances #-} +-- {-# LANGUAGE NoMonomorphismRestriction #-} + module HsBot.Base.State where import qualified Data.Map as M @@ -13,6 +18,15 @@ data State = State { users :: [User] } deriving (Show, Read) +makeDefaultState :: State +makeDefaultState = State { + isReady = False, + currentSender = "", + currentChannel = "", + line = "", + users = [] + } + stateNumUsers :: State -> Int stateNumUsers state = length $ users state |
