readExprExprs :: QExpr -> [RuleBinding] -> Maybe [Binding]
readExprExprs expr = mapM (readPath expr)
    -- If exprRulePred succeeds, then every path should be valid
    where readPath :: QExpr -> RuleBinding -> Maybe Binding
          readPath e (RuleVariableBinding name path) = assert (has path e) $ VariableBinding name <$> e ^? path
          readPath e (RuleExpressionBinding name path) = assert (has path e) $ ExpressionBinding name <$> e ^? path
readExprExprs :: QExpr -> [RuleBinding] -> Maybe [Binding]
readExprExprs expr = mapM (readPath expr)
    -- If exprRulePred succeeds, then every path should be valid
    where readPath :: QExpr -> RuleBinding -> Maybe Binding
          readPath e (RuleVariableBinding name path) = assert (has path e) $ VariableBinding name <$> e ^? path
          readPath e (RuleExpressionBinding name path) = assert (has path e) $ ExpressionBinding name <$> e ^? path
readExprExprs expr = mapM (readPath expr)
    -- If exprRulePred succeeds, then every path should be valid
    where readPath :: QExpr -> RuleBinding -> Maybe Binding
          readPath e (RuleVariableBinding name path) = assert (has path e) $ VariableBinding name <$> e ^? path
          readPath e (RuleExpressionBinding name path) = assert (has path e) $ ExpressionBinding name <$> e ^? path