exprToPred :: QExprPath -> QExpr -> State RuleState ExprPred
exprToPred path (Var x _) =
    case classifyVar x of
        Expression -> return pExpr'
        (BoundExpression name) -> do
            bindExpression name path
            return pExpr'
        Variable -> return pVar'
        (BoundVariable name) -> do
            bindVariable name (path.var_identL)
            return pVar'
        Normal -> return $ pVar (pIdent x)
exprToPred :: QExprPath -> QExpr -> State RuleState ExprPred
exprToPred path (Var x _) =
    case classifyVar x of
        Expression -> return pExpr'
        (BoundExpression name) -> do
            bindExpression name path
            return pExpr'
        Variable -> return pVar'
        (BoundVariable name) -> do
            bindVariable name (path.var_identL)
            return pVar'
        Normal -> return $ pVar (pIdent x)
exprToPred path (Var x _) =
    case classifyVar x of
        Expression -> return pExpr'
        (BoundExpression name) -> do
            bindExpression name path
            return pExpr'
        Variable -> return pVar'
        (BoundVariable name) -> do
            bindVariable name (path.var_identL)
            return pVar'
        Normal -> return $ pVar (pIdent x)