cmd_doc :: String -> IP.IdrisParser (Either String Command)
cmd_doc name = do
    let constant = do
          c <- IP.constant
          P.eof
          return $ Right (DocStr (Right c) FullDocs)

    let pType = do
          IP.reserved "Type"
          P.eof
          return $ Right (DocStr (Left $ sUN "Type") FullDocs)

    let fnName = fnNameArg (\n -> DocStr (Left n) FullDocs) name

    P.try constant <|> pType <|> fnName
cmd_doc :: String -> IP.IdrisParser (Either String Command)
cmd_doc name = do
    let constant = do
          c <- IP.constant
          P.eof
          return $ Right (DocStr (Right c) FullDocs)

    let pType = do
          IP.reserved "Type"
          P.eof
          return $ Right (DocStr (Left $ sUN "Type") FullDocs)

    let fnName = fnNameArg (\n -> DocStr (Left n) FullDocs) name

    P.try constant <|> pType <|> fnName
cmd_doc name = do
    let constant = do
          c <- IP.constant
          P.eof
          return $ Right (DocStr (Right c) FullDocs)

    let pType = do
          IP.reserved "Type"
          P.eof
          return $ Right (DocStr (Left $ sUN "Type") FullDocs)

    let fnName = fnNameArg (\n -> DocStr (Left n) FullDocs) name

    P.try constant <|> pType <|> fnName