exprArg :: (PTerm -> Command) -> String -> IP.IdrisParser (Either String Command)
exprArg cmd name = do
    let noArg = do
          P.eof
          return $ Left ("Usage is :" ++ name ++ " <expression>")

    let justOperator = do
          (op, fc) <- IP.withExtent IP.symbolicOperator
          P.eof
          return $ Right $ cmd (PRef fc [] (sUN op))

    let properArg = do
          t <- IP.fullExpr defaultSyntax
          return $ Right (cmd t)
    P.try noArg <|> P.try justOperator <|> properArg
exprArg :: (PTerm -> Command) -> String -> IP.IdrisParser (Either String Command)
exprArg cmd name = do
    let noArg = do
          P.eof
          return $ Left ("Usage is :" ++ name ++ " <expression>")

    let justOperator = do
          (op, fc) <- IP.withExtent IP.symbolicOperator
          P.eof
          return $ Right $ cmd (PRef fc [] (sUN op))

    let properArg = do
          t <- IP.fullExpr defaultSyntax
          return $ Right (cmd t)
    P.try noArg <|> P.try justOperator <|> properArg
exprArg cmd name = do
    let noArg = do
          P.eof
          return $ Left ("Usage is :" ++ name ++ " <expression>")

    let justOperator = do
          (op, fc) <- IP.withExtent IP.symbolicOperator
          P.eof
          return $ Right $ cmd (PRef fc [] (sUN op))

    let properArg = do
          t <- IP.fullExpr defaultSyntax
          return $ Right (cmd t)
    P.try noArg <|> P.try justOperator <|> properArg