From 1c16624f000070eb996b001cb9bf5a5bce18a7d8 Mon Sep 17 00:00:00 2001 From: pb Date: Sun, 14 Mar 2010 12:41:48 +0000 Subject: git-svn-id: https://ssl.buetow.org/repos/hsbot/trunk@24 9f8f72e9-4bf4-416e-b76e-7d4203597157 --- State.hs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'State.hs') diff --git a/State.hs b/State.hs index 6076901..27fd11f 100644 --- a/State.hs +++ b/State.hs @@ -1,3 +1,18 @@ module State where +import List + +import User + +data State = State { + channel :: String, + line :: String, + users :: [User] + } deriving (Show, Read) + +stateNumUsers :: State -> Int +stateNumUsers state = length $ users state + +stateSortedUsers :: State -> [User] +stateSortedUsers state = sort $ users state -- cgit v1.2.3