arithExprGenericIso :: SexpG ArithExpr
arithExprGenericIso = expr
  where
    expr :: SexpG ArithExpr
    expr = match
      $ With (\lit -> lit . int)
      $ With (\add -> add . list (el (sym "+") >>> el expr >>> el expr))
      $ With (\mul -> mul . list (el (sym "*") >>> rest expr))
      $ End

----------------------------------------------------------------------
-- Test cases
arithExprGenericIso :: SexpG ArithExpr
arithExprGenericIso = expr
  where
    expr :: SexpG ArithExpr
    expr = match
      $ With (\lit -> lit . int)
      $ With (\add -> add . list (el (sym "+") >>> el expr >>> el expr))
      $ With (\mul -> mul . list (el (sym "*") >>> rest expr))
      $ End

----------------------------------------------------------------------
-- Test cases
arithExprGenericIso = expr
  where
    expr :: SexpG ArithExpr
    expr = match
      $ With (\lit -> lit . int)
      $ With (\add -> add . list (el (sym "+") >>> el expr >>> el expr))
      $ With (\mul -> mul . list (el (sym "*") >>> rest expr))
      $ End

----------------------------------------------------------------------
-- Test cases