From 2341aa600daac2c8afa366cd612a893580104a93 Mon Sep 17 00:00:00 2001 From: pb Date: Sun, 28 Mar 2010 21:39:32 +0000 Subject: git-svn-id: https://ssl.buetow.org/repos/hsbot/trunk@55 9f8f72e9-4bf4-416e-b76e-7d4203597157 --- HsBot/Base/State.hs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'HsBot/Base') 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 -- cgit v1.2.3