getIdent :: HasLogFunc e => Env -> Dbi -> RIO e LogIdentity
getIdent env dbi = do
    logDebug "Reading log identity"
    getTbl env >>= traverse decodeIdent >>= \case
        Nothing -> throwIO NoLogIdentity
        Just li -> pure li
  where
    decodeIdent :: (Noun, Noun, Noun) -> RIO e LogIdentity
    decodeIdent = fromNounExn . toNoun

    getTbl :: Env -> RIO e (Maybe (Noun, Noun, Noun))
    getTbl env = do
        rwith (readTxn env) $ \txn -> do
            who  <- getMb txn dbi "who"
            fake <- getMb txn dbi "is-fake"
            life <- getMb txn dbi "life"
            pure $ (,,) <$> who <*> fake <*> life
getIdent :: HasLogFunc e => Env -> Dbi -> RIO e LogIdentity
getIdent env dbi = do
    logDebug "Reading log identity"
    getTbl env >>= traverse decodeIdent >>= \case
        Nothing -> throwIO NoLogIdentity
        Just li -> pure li
  where
    decodeIdent :: (Noun, Noun, Noun) -> RIO e LogIdentity
    decodeIdent = fromNounExn . toNoun

    getTbl :: Env -> RIO e (Maybe (Noun, Noun, Noun))
    getTbl env = do
        rwith (readTxn env) $ \txn -> do
            who  <- getMb txn dbi "who"
            fake <- getMb txn dbi "is-fake"
            life <- getMb txn dbi "life"
            pure $ (,,) <$> who <*> fake <*> life
getIdent env dbi = do
    logDebug "Reading log identity"
    getTbl env >>= traverse decodeIdent >>= \case
        Nothing -> throwIO NoLogIdentity
        Just li -> pure li
  where
    decodeIdent :: (Noun, Noun, Noun) -> RIO e LogIdentity
    decodeIdent = fromNounExn . toNoun

    getTbl :: Env -> RIO e (Maybe (Noun, Noun, Noun))
    getTbl env = do
        rwith (readTxn env) $ \txn -> do
            who  <- getMb txn dbi "who"
            fake <- getMb txn dbi "is-fake"
            life <- getMb txn dbi "life"
            pure $ (,,) <$> who <*> fake <*> life