added some debug watches to todo
This commit is contained in:
parent
5c0feb07a6
commit
aff2d488cc
1 changed files with 4 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue