Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For examples, see https://github.com/alexfmpe/obelisk/tree/ae%40test-new-workflows.
which currently has this code inlined for faster prototyping. Now thatob runsupports loading dependencies into its repl, I'll switch to that instead.The advantage of
WizardandStackoverWorkflowis that they can be composed easily. AWorkflowdeclares all its future replacements up-front, whileWizardandStackpieces can be created from am (Event t a)widget, with a life-cycle then being specified by chaining several widgets monadically. AFAICT this is similar to Concur'sWidgetOnly one layer of a
Wizardexists at any given time. Each time a wizard layer triggers itsEvent, it is completely replaced by the following one.Wizardis adapted from https://github.com/reflex-frp/reflex/compare/workflow-monad.All layers of a
Stackarecan be present at the same time. Each time one layer triggers itsEvent, its entire sub-stack is replaced with a single child layer.AStackcan be made incremental with recourse toMaybeT.Stack(or rather, something that looked similar but was completely bugged) was discovered by accident while trying to get away with type tetris and failing miserably.The same temporal flow can be re-used for
StackandWizard:To-do in no particular order:
unsafeCoerceBind/Monadand didn't pay much attention to the rest.WorkflowandWizard