diff options
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 |
