org.finos.morphir.ir
Members list
Packages
Type members
Classlikes
Attributes
- Companion
- object
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
- Self type
Attributes
- Companion
- class
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
AccessControlled.type
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
- Self type
-
Distribution.type
Attributes
- Companion
- object
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Companion
- trait
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
InferredTypeOf.type
Attributes
- Companion
- object
- Supertypes
-
trait Serializableclass Objecttrait Matchableclass Any
- Known subtypes
-
object IsNotAValue.type
Attributes
- Companion
- class
- Supertypes
-
trait Sumtrait Mirrorclass IsNotAValue[Any]trait Serializableclass Objecttrait Matchableclass AnyShow all
- Self type
-
IsNotAValue.type
Attributes
- Supertypes
- Self type
-
Module.type
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Companion
- class
- Supertypes
-
trait Sumtrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
MorphirIRVersion.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object NeedsAttributes.type
A value of type NeedAttributes[A]
provides implicit evidence that a node with attributes type A
needs attribute values, that is, that A
is not equal to Any
.
A value of type NeedAttributes[A]
provides implicit evidence that a node with attributes type A
needs attribute values, that is, that A
is not equal to Any
.
Attributes
- Companion
- object
- Supertypes
-
trait Serializableclass Objecttrait Matchableclass Any
- Known subtypes
-
object NeedsAttributes.type
Attributes
- Companion
- class
- Supertypes
-
trait Sumtrait Mirrorclass NeedsAttributes[Nothing]trait Serializableclass Objecttrait Matchableclass AnyShow all
- Self type
-
NeedsAttributes.type
Attributes
- Supertypes
- Self type
-
PackageModule.type
Attributes
- Supertypes
-
trait Producttrait Equalsclass Exceptionclass Throwabletrait Serializableclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Supertypes
-
class AnyValtrait Matchableclass Any
Attributes
- Supertypes
- Self type
-
Type.type
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object Type.type
- Self type
In functional programming data and logic are treated the same way and we refer to both as values. This module provides the building blocks for those values (data and logic) in the Morphir IR.
In functional programming data and logic are treated the same way and we refer to both as values. This module provides the building blocks for those values (data and logic) in the Morphir IR.
If you use Elm as your frontend language for Morphir then you should think about all the logic and constant values that you can put in the body of a function. Here are a few examples:
myThreshold =
1000
min a b =
if a < b then
a
else b
addTwo a = a + 2
All the above are values: the first one is just data, the second one is logic and the last one has both logic and data. In either case each value is represented by a Value
expression. This is a recursive data structure with various node types representing each possible language construct. You can check out the documentation for values below to find more details. Here are the Morphir IR snippets for the above values as a quick reference:
myThreshold = Literal () (WholeNumberLiteral 1000)
min a b = IfThenElse () (Apply () (Apply () (Reference () (fqn "Morphir.SDK" "Basics" "lessThan")) (Variable () [ "a"
]) ) (Variable () [ "b" ]) ) (Variable () [ "a" ]) (Variable () [ "b" ])
addTwo a = Apply () (Apply () (Reference () (fqn "Morphir.SDK" "Basics" "add")) (Variable () [ "a" ]) ) (Literal ()
(WholeNumberLiteral 2))
Attributes
- Supertypes
- Self type
-
Value.type