Effect type agnostic Console
with common methods to write to and read from the standard
console. Suited only for extremely simple console input and output.
- Example:
import cats.Monad import cats.effect.std.Console import cats.syntax.all._ def myProgram[F[_]: Console: Monad]: F[Unit] = for { _ <- Console[F].println("Please enter your name: ") n <- Console[F].readLine _ <- if (n.nonEmpty) Console[F].println("Hello, " + n) else Console[F].errorln("Name is empty!") } yield ()
- Companion:
- object
class Object
trait Matchable
class Any
Value members
Abstract methods
Concrete methods
Deprecated methods
@deprecated("Not implemented for Scala.js. On Node.js consider using fs2.io.stdin.", "3.4.0")
Implicitly added by catsKleisliConsole
- Deprecated
@deprecated("Not implemented for Scala.js. On Node.js consider using fs2.io.stdin.", "3.4.0")
- Deprecated
@deprecated("Not implemented for Scala.js. On Node.js consider using fs2.io.stdin.", "3.4.0")
Implicitly added by catsKleisliConsole
- Deprecated
@deprecated("Not implemented for Scala.js. On Node.js consider using fs2.io.stdin.", "3.4.0")
- Deprecated