jvmMain.it.unibo.tuprolog.solve.channel.Channels.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of solve-jvm Show documentation
Show all versions of solve-jvm Show documentation
Resolution-agnostic API for logic solvers
package it.unibo.tuprolog.solve.channel
import it.unibo.tuprolog.solve.exception.Warning
import java.io.StringReader
internal actual fun stdin(): InputChannel = ReaderChannel(System.`in`)
internal actual fun stderr(): OutputChannel = PrintStreamChannel(System.err)
internal actual fun stdout(): OutputChannel = PrintStreamChannel(System.out)
internal actual fun warning(): OutputChannel =
OutputChannel.of {
System.err.println(it.message)
System.err.flush()
}
internal actual fun stringInputChannel(string: String): InputChannel = ReaderChannel(StringReader(string))
© 2015 - 2025 Weber Informatics LLC | Privacy Policy