dataNodeAPIHandler' :: DataNodeState -> DataNodeAPI -> DataNodeReply
dataNodeAPIHandler' st (AddBlob bn blob)
  = case M.lookup bn (blobs st) of
      Nothing ->
        reply OK st'
        where
          st' = st { blobs = M.insert bn blob (blobs st) }
      Just bdata -> do
        say (bn ++ " := " ++ show bdata)
        reply BlobExists st
dataNodeAPIHandler' :: DataNodeState -> DataNodeAPI -> DataNodeReply
dataNodeAPIHandler' st (AddBlob bn blob)
  = case M.lookup bn (blobs st) of
      Nothing ->
        reply OK st'
        where
          st' = st { blobs = M.insert bn blob (blobs st) }
      Just bdata -> do
        say (bn ++ " := " ++ show bdata)
        reply BlobExists st
dataNodeAPIHandler' st (AddBlob bn blob)
  = case M.lookup bn (blobs st) of
      Nothing ->
        reply OK st'
        where
          st' = st { blobs = M.insert bn blob (blobs st) }
      Just bdata -> do
        say (bn ++ " := " ++ show bdata)
        reply BlobExists st