* rename force_wrap to force
* add a bunch of builder methods to Term<Name>
* refactor one tiny location to show off builder methods
* split generate into `generate` and `generate_test`
* create wrap_as_multi_validator function
Co-authored-by: Kasey White <kwhitemsg@gmail.com>
And disable multi-patterns clauses. I was originally just controlling
whether we did disable that from the parser but then I figured we
could actually support multi-patterns clauses quite easily by simply
desugaring a multi-pattern into multiple clauses.
This is only a syntactic sugar, which means that the cost of writing
that on-chain is as expensive as writing the fully expanded form; yet
it seems like a useful shorthand; especially for short clause
expressions.
This commit however disables multi-pattern when clauses, which we do
not support in the code-generation. Instead, one pattern on tuples for
that.
This leads to more consistent formatting across entire Aiken programs.
Before that commit, only long expressions would be formatted on a
newline, causing non-consistent formatting and additional reading
barrier when looking at source code.
Programs also now take more vertical space, which is better for more
friendly diffing in version control systems (especially git).
-> The provided Plutus code called 'error'.
This scenario _could_ work if `choose_data` was lazy in its arguments.
Which is a reasonable thing to expect from `choose_data`. Since we
don't have any way to introduce on-demand lazyness in the language
(and we are not looking for ways), we need to make a special case for
`choose_data` which is a perfect (and singular) use case for it.
Editor configurations and other system-specific files aren't meant to
be committed to public repository. This belongs to a dev environment
and should be handled by developers themselves though local git
configurations.