finos/morphir-ir/versions/v4 does not have a README file
test {
let map = { 3: "three", 8: "eight", 1: "one" }
@test.assert_eq(map.get(2), None)
@test.assert_eq(map.get(3), Some("three"))
map.set(3, "updated")
@test.assert_eq(map.get(3), Some("updated"))
}test {
let map = { 3: "three", 8: "eight", 1: "one" }
@test.assert_eq(map.get(2), None)
@test.assert_eq(map.get(3), Some("three"))
map.set(3, "updated")
@test.assert_eq(map.get(3), Some("updated"))
}pub(all) enum Distribution {
Library(Path, Map[Path, PackageSpecification], PackageDefinition)
Specs(Path, Map[Path, PackageSpecification], PackageSpecification)
Application(Path, Map[Path, PackageDefinition], PackageDefinition, Map[String, EntryPoint])
} derive(Eq, Debug)fn IRFile::new(distribution : Distribution, format_version? : FormatVersion) -> IRFile raise VersionErrorpub(all) struct ModuleDefinition {
types : Map[Name, AccessControlled[Documented[TypeDefinition]]]
values : Map[Name, AccessControlled[Documented[ValueDefinition]]]
doc : String?
} derive(Eq, Debug)pub(all) struct ModuleSpecification {
annotations : Array[Annotation]
types : Map[Name, Documented[TypeSpecification]]
values : Map[Name, Documented[ValueSpecification]]
doc : String?
} derive(Eq, Debug)pub(all) struct PackageDefinition {
modules : Map[Path, AccessControlled[ModuleDefinition]]
} derive(Eq, Debug)pub(all) enum Pattern {
WildcardPattern(ValueAttributes)
AsPattern(ValueAttributes, Pattern, Name)
TuplePattern(ValueAttributes, Array[Pattern])
ConstructorPattern(ValueAttributes, FQName, Array[Pattern])
EmptyListPattern(ValueAttributes)
HeadTailPattern(ValueAttributes, Pattern, Pattern)
LiteralPattern(ValueAttributes, PatternLiteral)
UnitPattern(ValueAttributes)
} derive(Eq, Debug)pub(all) enum Type {
Variable(TypeAttributes, Name)
Reference(TypeAttributes, FQName, Array[Type])
Tuple(TypeAttributes, Array[Type])
Union(TypeAttributes, Array[Type])
Record(TypeAttributes, Map[Name, Type])
ExtensibleRecord(TypeAttributes, Name, Map[Name, Type])
Function(TypeAttributes, Type, Type)
Unit(TypeAttributes)
} derive(Eq, Debug)pub(all) struct TypeSpecification {
annotations : Array[Annotation]
body : TypeSpecificationBody
} derive(Eq, Debug)pub(all) enum Value {
Literal(ValueAttributes, Literal)
Constructor(ValueAttributes, FQName)
Tuple(ValueAttributes, Array[Value])
List(ValueAttributes, Array[Value])
Record(ValueAttributes, Map[Name, Value])
Variable(ValueAttributes, Name)
Reference(ValueAttributes, FQName)
Field(ValueAttributes, Value, Name)
FieldFunction(ValueAttributes, Name)
Apply(ValueAttributes, Value, Value)
Lambda(ValueAttributes, Pattern, Value)
LetDefinition(ValueAttributes, Name, ValueDefinition, Value)
LetRecursion(ValueAttributes, Map[Name, ValueDefinition], Value)
Destructure(ValueAttributes, Pattern, Value, Value)
IfThenElse(ValueAttributes, Value, Value, Value)
PatternMatch(ValueAttributes, Value, Array[(Pattern, Value)])
UpdateRecord(ValueAttributes, Value, Map[Name, Value])
Unit(ValueAttributes)
Hole(ValueAttributes, HoleReason, Type?)
} derive(Eq, Debug)let UNKNOWN_MARKER : String