added some debug watches to todo

This commit is contained in:
Michael James 2014-08-24 08:46:42 -04:00
parent 5c0feb07a6
commit aff2d488cc

View file

@ -23,6 +23,7 @@ import Html.Events (..)
import Html.Optimize.RefEq as Ref import Html.Optimize.RefEq as Ref
import Maybe import Maybe
import Window import Window
import Debug
import Graphics.Input (..) import Graphics.Input (..)
import Graphics.Input as Input import Graphics.Input as Input
@ -47,7 +48,7 @@ type Task =
newTask : String -> Int -> Task newTask : String -> Int -> Task
newTask desc id = newTask desc id =
{ description = desc { description = Debug.watch "Most Recent Task Description" desc
, completed = False , completed = False
, editing = False , editing = False
, id = id , id = id
@ -82,11 +83,11 @@ data Action
-- How we step the state forward for any given action -- How we step the state forward for any given action
step : Action -> State -> State step : Action -> State -> State
step action state = step action state =
case action of case Debug.watch "Current action" action of
NoOp -> state NoOp -> state
Add -> Add ->
{ state | uid <- state.uid + 1 { state | uid <- Debug.watch "Todo ID" state.uid + 1
, field <- "" , field <- ""
, tasks <- if String.isEmpty state.field , tasks <- if String.isEmpty state.field
then state.tasks then state.tasks