diff options
| author | pb <pb@9f8f72e9-4bf4-416e-b76e-7d4203597157> | 2010-03-14 12:41:48 +0000 |
|---|---|---|
| committer | pb <pb@9f8f72e9-4bf4-416e-b76e-7d4203597157> | 2010-03-14 12:41:48 +0000 |
| commit | 1c16624f000070eb996b001cb9bf5a5bce18a7d8 (patch) | |
| tree | 064781dec938cacfa625c1bdc17883b27d995ffe /State.hs | |
| parent | d102f483205bf2969ddf60063ba2b03c0c2b508a (diff) | |
git-svn-id: https://ssl.buetow.org/repos/hsbot/trunk@24 9f8f72e9-4bf4-416e-b76e-7d4203597157
Diffstat (limited to 'State.hs')
| -rw-r--r-- | State.hs | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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 |
