dotty.tools.repl.results.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scala3-compiler_3 Show documentation
Show all versions of scala3-compiler_3 Show documentation
scala3-compiler-bootstrapped
package dotty.tools
package repl
import dotc.reporting.Diagnostic
/** Contains the different data and type structures used to model results
* in the REPL
*/
object results {
/** Type alias for `List[Diagnostic]` */
type Errors = List[Diagnostic]
/** Result is a type alias for an Either with left value `Errors` */
type Result[+A] = scala.util.Either[Errors, A]
extension [A](a: A)
def result: Result[A] = scala.util.Right(a)
extension [A](xs: Errors)
def errors: Result[A] = scala.util.Left(xs)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy