@@ -109,11 +109,14 @@ getResourceWith reader = do
109109
110110
111111--------------------------------------------------------------------------------
112+-- | Save a snapshot of the item. This function returns the same item, which
113+-- convenient for building '>>=' chains.
112114saveSnapshot :: (Binary a, Typeable a)
113− => Internal.Snapshot -> Item a -> Compiler ()
115+ => Internal.Snapshot -> Item a -> Compiler (Item a)
114116saveSnapshot snapshot item = do
115117 store <- compilerStore <$> compilerAsk
116118 compilerUnsafeIO $ Internal.saveSnapshot store snapshot item
119+ return item
117120
118121
119122--------------------------------------------------------------------------------