lookupNode :: NodeName -> Build NodeDef
lookupNode n = uses renderedNodeDefs (Map.lookup n) >>= \case
    Just n' -> return n'
    Nothing -> error $ "lookupNode: unknown node name " ++ show n

-- | Add a new node for a given 'OpDef'.  This is used for making "stateful" ops
-- which are not safe to dedup (e.g, "variable" and "assign").
lookupNode :: NodeName -> Build NodeDef
lookupNode n = uses renderedNodeDefs (Map.lookup n) >>= \case
    Just n' -> return n'
    Nothing -> error $ "lookupNode: unknown node name " ++ show n

-- | Add a new node for a given 'OpDef'.  This is used for making "stateful" ops
-- which are not safe to dedup (e.g, "variable" and "assign").
lookupNode n = uses renderedNodeDefs (Map.lookup n) >>= \case
    Just n' -> return n'
    Nothing -> error $ "lookupNode: unknown node name " ++ show n

-- | Add a new node for a given 'OpDef'.  This is used for making "stateful" ops
-- which are not safe to dedup (e.g, "variable" and "assign").