@@ -29,7 +29,7 @@ import Reflex.TriggerEvent.Base hiding (askEvents)
2929import Reflex.TriggerEvent.Class
3030
3131import Control.Concurrent.Chan
32−import Control.Lens hiding (element)
32+import Control.Lens hiding (element, ix)
3333import Control.Monad.Exception
3434import Control.Monad.Primitive
3535import Control.Monad.Reader
@@ -894,7 +894,7 @@ getTouchEvent = do
894894 Nothing -> return []
895895 Just ts -> do
896896 n <- TouchList.getLength ts
897− fmap catMaybes . forM [0 .. n - 1] $ \ix -> do
897+ fmap catMaybes . forM (takeWhile (< n) [0..]) $ \ix -> do
898898 mt <- TouchList.item ts ix
899899 forM mt $ \t -> do
900900 identifier <- Touch.getIdentifier t