module Main where -- A simple stop watch with a run/stop button and a reset button. import Fudgets main = fudlogue (shellF "Stop Watch" stopWatchF) stopWatchF = timeDispF >==< (counterSP 0 >^^=< idRightF (timerF >=^< timeprep)) >==< (runF >+< resetF) -- >+ let out n = putSP n $ counterSP n in case msg of Left _ -> out (no+1) Right _ -> out 0