procCmd :: Session a => a -> Named CMD
        -> IO (ProofStatus [EXPRESSION], [(Named CMD, ProofStatus [EXPRESSION])])
procCmd sess cmd = case cmdstring of
                     "simplify" -> cassimplify sess cmd
                     "ask" -> casask sess cmd
                     "divide" -> casremainder sess cmd
                     "rlqe" -> casqelim sess cmd
                     "factorize" -> casfactorExp sess cmd
                     "int" -> casint sess cmd
                     "solve" -> cassolve sess cmd
                     _ -> error "Command not supported"
    where Cmd cmdstring _ = sentence cmd

-- | sends the given string to the CAS, reads the result and tries to parse it.
procCmd :: Session a => a -> Named CMD
        -> IO (ProofStatus [EXPRESSION], [(Named CMD, ProofStatus [EXPRESSION])])
procCmd sess cmd = case cmdstring of
                     "simplify" -> cassimplify sess cmd
                     "ask" -> casask sess cmd
                     "divide" -> casremainder sess cmd
                     "rlqe" -> casqelim sess cmd
                     "factorize" -> casfactorExp sess cmd
                     "int" -> casint sess cmd
                     "solve" -> cassolve sess cmd
                     _ -> error "Command not supported"
    where Cmd cmdstring _ = sentence cmd

-- | sends the given string to the CAS, reads the result and tries to parse it.
procCmd sess cmd = case cmdstring of
                     "simplify" -> cassimplify sess cmd
                     "ask" -> casask sess cmd
                     "divide" -> casremainder sess cmd
                     "rlqe" -> casqelim sess cmd
                     "factorize" -> casfactorExp sess cmd
                     "int" -> casint sess cmd
                     "solve" -> cassolve sess cmd
                     _ -> error "Command not supported"
    where Cmd cmdstring _ = sentence cmd

-- | sends the given string to the CAS, reads the result and tries to parse it.