SIRType

scalus.sir.SIRType
See theSIRType companion trait
object SIRType

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
SIRType.type

Members list

Keywords
  • no keywords
  • case
  • sealed

Type members

Classlikes

case object BLS12_381_G1_Element extends Primitive

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Primitive
trait SIRType
class Object
trait Matchable
class Any
Show all
Self type
case object BLS12_381_G2_Element extends Primitive

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Primitive
trait SIRType
class Object
trait Matchable
class Any
Show all
Self type
case object BLS12_381_MlResult extends Primitive

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Primitive
trait SIRType
class Object
trait Matchable
class Any
Show all
Self type
case object Boolean extends Primitive

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Primitive
trait SIRType
class Object
trait Matchable
class Any
Show all
Self type
Boolean.type
case object ByteString extends Primitive

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Primitive
trait SIRType
class Object
trait Matchable
class Any
Show all
Self type
ByteString.type
case class CaclulateApplyTypeException(msg: String, cause: Throwable | Null) extends RuntimeException

Attributes

Supertypes
trait Product
trait Equals
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class CaseClass(constrDecl: ConstrDecl, typeArgs: List[SIRType], parent: Option[SIRType]) extends SIRType

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait SIRType
class Object
trait Matchable
class Any
Show all
case object Data extends Primitive

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Primitive
trait SIRType
class Object
trait Matchable
class Any
Show all
Self type
Data.type
case object FreeUnificator extends SIRType

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait SIRType
class Object
trait Matchable
class Any
Show all
Self type
case class Fun(in: SIRType, out: SIRType) extends SIRType

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait SIRType
class Object
trait Matchable
class Any
Show all
case object Integer extends Primitive

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Primitive
trait SIRType
class Object
trait Matchable
class Any
Show all
Self type
Integer.type
object List

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
List.type
object Pair

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Pair.type
sealed trait Primitive extends SIRType

Attributes

Supertypes
trait SIRType
class Object
trait Matchable
class Any
Known subtypes
object Boolean
object ByteString
object Data
object Integer
object String
object Unit
Show all
case object String extends Primitive

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Primitive
trait SIRType
class Object
trait Matchable
class Any
Show all
Self type
String.type
case class SumCaseClass(decl: DataDecl, typeArgs: List[SIRType]) extends SIRType

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait SIRType
class Object
trait Matchable
class Any
Show all
case class TypeApplyException(msg: String, cause: Throwable | Null) extends RuntimeException

Attributes

Supertypes
trait Product
trait Equals
class RuntimeException
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
case class TypeLambda(params: List[TypeVar], body: SIRType) extends SIRType

Type lamnda (always carried).

Type lamnda (always carried).

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait SIRType
class Object
trait Matchable
class Any
Show all
object TypeLambda

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
TypeLambda.type
object TypeLambda2

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case class TypeNonCaseModule(name: String) extends SIRType

Represents a package or companion object of a case class. Note, that case objects going to case-class.

Represents a package or companion object of a case class. Note, that case objects going to case-class.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait SIRType
class Object
trait Matchable
class Any
Show all
case object TypeNothing extends SIRType

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait SIRType
class Object
trait Matchable
class Any
Show all
Self type
class TypeProxy(var _ref: SIRType | Null) extends SIRType

Attributes

Companion
object
Supertypes
trait SIRType
class Object
trait Matchable
class Any
object TypeProxy

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
TypeProxy.type
case class TypeVar(name: String, optId: Option[Long]) extends SIRType

Type variable have two forms: when id is not set, that means that for each instantiation of type-lambda, a new set of type-variables with fresh id-s are created. when id is set, that means that computations are situated in the process of instantiation of some type-lambda,

Type variable have two forms: when id is not set, that means that for each instantiation of type-lambda, a new set of type-variables with fresh id-s are created. when id is set, that means that computations are situated in the process of instantiation of some type-lambda,

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait SIRType
class Object
trait Matchable
class Any
Show all
case object Unit extends Primitive

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Primitive
trait SIRType
class Object
trait Matchable
class Any
Show all
Self type
Unit.type

Value members

Concrete methods

def calculateApplyType(f: SIRType, arg: SIRType, env: Map[TypeVar, SIRType], debug: Boolean): SIRType
def checkAllProxiesFilled(tp: SIRType): Boolean
def checkAllProxiesFilledTraced(tp: SIRType, traceloops: IdentityHashMap[SIRType, SIRType], log: List[String]): Boolean
def fromUplcTypeScheme(uplcTypeSchema: TypeScheme): SIRType
def isPolyFunOrFun(tp: SIRType, trace: IdentityHashMap[SIRType, SIRType]): Boolean

Check if the type is a function or a polymorphic function without unfolding type arguments. (i.e. isPolyFunOrFun(SIRType.Fun(SIRType.Unit, SIRType.Unit)) == true, isPolyFunOrFun(SIRType.TypeVar("A")) == false even if A is a needed function)

Check if the type is a function or a polymorphic function without unfolding type arguments. (i.e. isPolyFunOrFun(SIRType.Fun(SIRType.Unit, SIRType.Unit)) == true, isPolyFunOrFun(SIRType.TypeVar("A")) == false even if A is a needed function)

Value parameters

tp
  • type to check
trace
  • trace for recursive entries

Attributes

def isPolyFunOrFunUnit(tp: SIRType, trace: IdentityHashMap[SIRType, SIRType]): Boolean

Check if the type is a function or a polymorphic function from unit without unfolding type arguments. (i.e. isPolyFunOrFunUnit(SIRType.Fun(SIRType.Unit, SIRType.Unit)) == true, isPolyFunOrFunInut(SIRType.Fun(SIRType.Integer, SIRType.Unit)) == false, isPolyFunOrFunUnt(SIRType.TypeVar("A")) == false even if A is a needed function)

Check if the type is a function or a polymorphic function from unit without unfolding type arguments. (i.e. isPolyFunOrFunUnit(SIRType.Fun(SIRType.Unit, SIRType.Unit)) == true, isPolyFunOrFunInut(SIRType.Fun(SIRType.Integer, SIRType.Unit)) == false, isPolyFunOrFunUnt(SIRType.TypeVar("A")) == false even if A is a needed function)

Value parameters

tp
  • type to check
trace
  • trace for recursive entries

Attributes

def substitute(rType: SIRType, env: Map[TypeVar, SIRType], proxyEnv: Map[TypeProxy, TypeProxy]): SIRType
def syntheticNarrowConstrDeclName(childDataDeclName: String): String
def typeApply(tpl: SIRType, args: List[SIRType]): SIRType

Givens