disconnectCAS :: Session a => a -> IO ()
disconnectCAS s = do
  hPutStrLn (inp s) "quit;"
  case proch s of
    Nothing -> return ()

    {- this is always better, because it closes also the shell-process,
    hence use a Session-variant with ProcessHandle! -}
    Just ph -> waitForProcess ph >> return ()
  putStrLn "CAS disconnected"
  return ()
disconnectCAS :: Session a => a -> IO ()
disconnectCAS s = do
  hPutStrLn (inp s) "quit;"
  case proch s of
    Nothing -> return ()

    {- this is always better, because it closes also the shell-process,
    hence use a Session-variant with ProcessHandle! -}
    Just ph -> waitForProcess ph >> return ()
  putStrLn "CAS disconnected"
  return ()
disconnectCAS s = do
  hPutStrLn (inp s) "quit;"
  case proch s of
    Nothing -> return ()

    {- this is always better, because it closes also the shell-process,
    hence use a Session-variant with ProcessHandle! -}
    Just ph -> waitForProcess ph >> return ()
  putStrLn "CAS disconnected"
  return ()