15 lines
448 B
Haskell
15 lines
448 B
Haskell
module TodoListItem where
|
|
|
|
data TodoListItem = TodoListItem
|
|
{ name :: String
|
|
, done :: Bool
|
|
}
|
|
|
|
instance Show TodoListItem where
|
|
show (TodoListItem name done) =
|
|
s done ++ " " ++ name ++ "\n"
|
|
where
|
|
s True = "[x]"
|
|
s False = "[ ]"
|
|
|
|
-- TODO: create a class to render items to html to make it easier to create everything for the website using the web primitives
|