@@ -55,12 +55,10 @@ instance (Ord k, Query v) => Query (MonoidalMap k v) where
5555 type QueryResult (MonoidalMap k v) = MonoidalMap k (QueryResult v)
5656 crop q r = MonoidalMap.intersectionWith (flip crop) r q
5757
58−-- asking two questions is the same as asking both questions.
5958instance (Query a, Query b) => Query (a, b) where
6059 type QueryResult (a, b) = (QueryResult a, QueryResult b)
6160 crop (x, x') (y, y') = (crop x y, crop x' y')
6261
63−-- ¯\_(゚ヮ゚)_/¯ ¯\_(ツ)_/¯
6462instance Query () where
6563 type QueryResult () = ()
6664 crop _ _ = ()
@@ -143,7 +141,7 @@ queryDyn q = do
143141 tellQueryDyn q
144142 zipDynWith crop q <$> askQueryResult
145143
146−-- | We can already say this in reflex
144+-- | use a query morphism to operate on a smaller version of a query.
147145subQuery :: (Reflex t, MonadQuery t q2 m, Monad m) => QueryMorphism q1 q2 -> Dynamic t q1 -> m (Dynamic t (QueryResult q1))
148146subQuery (QueryMorphism f g) x = fmap g <$> queryDyn (fmap f x)
149147