Failure
[1 of 33] Compiling arch.node.types.engine [2 of 33] Compiling arch.node.types.engine_behaviour [16 of 33] Compiling arch.node.types.anoma_environment [25 of 33] Compiling arch.node.engines.commitment_environment /home/runner/work/nspec/nspec/docs/arch/system/identity/identity.juvix.md:93-102:14-44: error: The expression let not-mutual SignerType : Type := _ not-mutual Signable : Type := _ not-mutual Commitment : Type := _ not-mutual sign : _ -> _ -> Commitment := λ : _ -> _ -> Commitment {| _ω x := Ed25519Signature} in mkSigner {SignerType} {Signable} {Commitment} sign has type: Signer Backend Nat (Nat -> Signature) but is expected to have type: Signer Backend Nat Commitment
icon: octicons/gear-16 search: exclude: false categories: - engine - node tags: - template-engine - engine-definition
Juvix preamble
module arch.node.engines.template;
import prelude open;
import arch.node.engines.template_messages open public;
import arch.node.engines.template_environment open public;
import arch.node.engines.template_behaviour open public;
import arch.node.types.engine open public;
open template_environment_example;
Template Engine¶
Purpose¶
Brief summary of the purpose of the engine.
Components¶
Useful links¶
- Some
- Useful
- Links
Type¶
TemplateEngine : Type :=
Engine
TemplateLocalState
TemplateMailboxState
TemplateTimerHandle
TemplateMatchableArgument
TemplateActionLabel
TemplatePrecomputationList;
Example of a template engine¶
exampleTemplateEngine : TemplateEngine := mkEngine@{
initEnv := templateEnvironment;
behaviour := templateBehaviour;
};
where templateEnvironment
is defined as follows:
templateEnvironment : TemplateEnvironment :=
mkEngineEnvironment@{
name := "template";
localState :=
mkTemplateLocalState@{
taskQueue :=
mkCustomData@{
word := "taskQueue";
};
};
mailboxCluster := Map.empty;
acquaintances := Set.empty;
timers := [];
};
and templateBehaviour
is defined as follows:
templateBehaviour : TemplateBehaviour :=
mkEngineBehaviour@{
guards := [messageOneGuard];
action := templateAction;
conflictSolver := templateConflictSolver;
};