io.github.iltotore.iron.macros

Members list

Concise view

Type members

Classlikes

object given_FromExpr_Boolean extends FromExpr[Boolean]

A FromExpr[Boolean] that can extract value from partially inlined || and && operations.

A FromExpr[Boolean] that can extract value from partially inlined || and && operations.

 inline val x = true
 val y: Boolean = ???

 x || y //inlined to `true`
 y || x //inlined to `true`

 inline val a = false
 val b: Boolean = ???

 a && b //inlined to `false`
 b && a //inlined to `false`

Attributes

Graph
Supertypes
trait FromExpr[Boolean]
class Object
trait Matchable
class Any
Self type
object given_FromExpr_String extends FromExpr[String]

A FromExpr[String] that can extract value from concatenated strings if all arguments are compile-time-extractable strings.

A FromExpr[String] that can extract value from concatenated strings if all arguments are compile-time-extractable strings.

 inline val x = "a"
 inline val y = "b"
 val z = "c"

 x + y //"ab"
 x + z //None
 z + x //None

Attributes

Graph
Supertypes
trait FromExpr[String]
class Object
trait Matchable
class Any
Self type

Internal macros for intersection types

Internal macros for intersection types

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
object union

Internal macros for union types

Internal macros for union types

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
union.type

Value members

Concrete methods

inline def assertCondition[A](inline input: A, inline cond: Boolean, inline message: String): Unit

Asserts at compile time if the given condition is true.

Asserts at compile time if the given condition is true.

Attributes

A

the input type.

cond

the tested condition. Should be evaluable at compile time.

input

the tested input, used in the error message if the assertion fails.

message

the message/description of this assertion.

inline def isConstant[A](inline value: A): Boolean

Checks if the given value is constant (aka evaluable at compile time).

Checks if the given value is constant (aka evaluable at compile time).

Attributes

A

the type of value.

value

the value to test.

Returns:

true if the given value is constant, false otherwise.

inline def nonConstantError[A](inline value: A): Nothing

Throw compile-time error indicating that the given value is not constant.

Throw compile-time error indicating that the given value is not constant.

Attributes

A

the type of value.

value

the non-constant value, used in the error message.

Givens

Givens

A FromExpr[Boolean] that can extract value from partially inlined || and && operations.

A FromExpr[Boolean] that can extract value from partially inlined || and && operations.

 inline val x = true
 val y: Boolean = ???

 x || y //inlined to `true`
 y || x //inlined to `true`

 inline val a = false
 val b: Boolean = ???

 a && b //inlined to `false`
 b && a //inlined to `false`

Attributes

A FromExpr[String] that can extract value from concatenated strings if all arguments are compile-time-extractable strings.

A FromExpr[String] that can extract value from concatenated strings if all arguments are compile-time-extractable strings.

 inline val x = "a"
 inline val y = "b"
 val z = "c"

 x + y //"ab"
 x + z //None
 z + x //None

Attributes