module Data.TMap.Backend.StdoutBackend( StdoutBackend
, newStdoutBackend )
where
import Data.TMap.Backend
import Control.Monad.Trans( MonadIO, liftIO )
data StdoutBackend k a = StdoutBackend
instance (Show a,Show k) => Backend k a StdoutBackend where
insert _ _ a = liftIO (print ("inserting: ",a)) >> return ()
adjust _ _ k = liftIO (print ("adjusting: ",k)) >> return ()
lookup _ k = liftIO (print ("looking up: ",k)) >> return Nothing
delete _ k = liftIO (print ("deleting: ",k)) >> return ()
newStdoutBackend :: StdoutBackend k a
newStdoutBackend = StdoutBackend