Commit Graph

1733 Commits

Author SHA1 Message Date
waalge f2e5b0b89b Add Deno to nix.
Chose to use nixos unstable otherwise version is lagging.
2023-03-15 12:24:35 -04:00
rvcas 7e467ada2b chore(gift_card): more readme info 2023-03-14 19:13:21 -04:00
rvcas 56aa53eb73 chore: update lucid 2023-03-14 19:13:21 -04:00
rvcas 81359246f9 chore: update against latest main, rerun build, change unlock interface 2023-03-14 19:13:21 -04:00
rvcas 0147af8330 chore: rename example parents folder to gift card 2023-03-14 19:13:21 -04:00
rvcas a522cd1e7d chore: better names for the validators and some functions 2023-03-14 19:13:21 -04:00
rvcas 5e062c130d feat: finish up end to end example
* create a gift card (nft)
* lock ADA while minting gift card
* unlock ADA while burning gift card

Co-authored-by: Kasey White <kwhitemsg@gmail.com>
2023-03-14 19:13:21 -04:00
rvcas 79fd6b4828 feat(one_shot): actually getting properly applied contracts
Co-authored-by: Kasey White <kwhitemsg@gmail.com>
2023-03-14 19:13:21 -04:00
rvcas a82cedbd92 feat(one_shot): apply params to script 2023-03-14 19:13:21 -04:00
rvcas e35ccc9e0c feat(one_shot): document vendored lucid 2023-03-14 19:13:21 -04:00
rvcas 14cdac7bfa feat(one_shot): some deno and lucid stuff 2023-03-14 19:13:21 -04:00
rvcas ab1ee17ad4 feat(one_shot): some deno boilerplate 2023-03-14 19:13:21 -04:00
rvcas 7ea8aeda01 feat: one_shot example
Co-authored-by: Kasey White <kwhitemsg@gmail.com>
2023-03-14 19:13:21 -04:00
rvcas e95d7214c9
chore: update changelog 2023-03-14 18:12:45 -04:00
Kasey White f830172493 fix: wrong scope being passed in for unwrapdata and wrapdata in assignment ir
Closes #441
2023-03-14 17:05:27 -04:00
rvcas 2a00ef281b
chore: bow to the clippy 2023-03-14 17:03:28 -04:00
KtorZ 724f1ac4b6 Remove unused 'FlexBreak'
The difference between 'FlexBreak' and 'Break(Mode::Strict/Flexible)' as always confused me; and turned out that the 'FlexBreak' thingy is never used. This is dead-code, so I removed it.
2023-03-14 16:47:43 -04:00
KtorZ 1311d9bd27 Support flexible pipe operator formatting
Rules are now as follows:

  - If a pipeline contains a newline, then the entire pipeline is formatted over multiple lines.
  - If it doesn't, then it's formatted as a single-line UNLESS it cannot fit; in which case, we fallback to multiline again.
2023-03-14 16:47:43 -04:00
KtorZ ae981403c6 Re-introduce field title & description in referenced schemas. 2023-03-12 12:44:49 -04:00
KtorZ 45a463786f Update blueprints from acceptance tests and hello, world. 2023-03-12 12:44:49 -04:00
KtorZ 451737237e Fix blueprint generation for recursive types.
This was a bit tricky and I ended up breaking things down a lot and
  trying different path. This commit is the result of the most
  satisfying one.

  It introduces a new 'concept' and types: Definitions and Reference.
  These elements are meant to reflect JSON pointers and JSON-schema
  definitions which we now use for pretty much all user-defined
  data-types.

  In fact, Schemas are no longer inlined, but are always referencing
  some schema under "definitions".

  This indirection is necessary in order to cope with recursive types.
  And while it's only truly necessary for recursive types, using it
  consistently makes it both easier to produce and easier to consume.

  ---

  The blueprint generation for recursive types here also works thanks to
  the 'Definitions' data-structure wrapper around a BTreeMap. This uses
  a strategy where:

  (1) schemas are only generated if they haven't been seen before
  (2) schemas are marked as seen BEFORE actually being generated (to
  effectively stop a recursive generation).

  This relies on one important aspect: the key must be uniquely
  identifying a given schema. Which means that we have to monomorphize
  data-types with generic parameters also here, and use keys that are
  specialized in one data-type.

  ---

  In this large overhaul we've also lost one thing which I didn't bother
  re-introducing yet to keep the work manageable: title for record
  fields. Before, we use to pull those from record constructor when
  available, yet now, every record constructor has been replaced by a
  `$ref`. We could theoritically attach a title to the reference. I'll
  try to quickly add that in a later commit.
2023-03-12 12:44:49 -04:00
KtorZ f67e049dc2 Introduce indirection for fields. 2023-03-12 12:44:49 -04:00
KtorZ 3a7aac0a33 Make blueprint code slightly more resilient to changes.
Leverage traits instead of hard-coded type parameters.
2023-03-12 12:44:49 -04:00
KtorZ e44f18bae5 Add failing test scenario for recursive types. 2023-03-12 12:44:49 -04:00
Kasey White 31c280552d add another validator 2023-03-12 00:25:26 -05:00
Kasey White 4a7bbc23df fix: change in scope was applied in wrong place in pattern_ir for constr expect 2023-03-12 00:25:26 -05:00
Matthias Benkort 4b9ccc8592
Merge pull request #426 from waalge/waalge/bump-cargo2nix
chore: bump rust version in nix
2023-03-11 12:05:07 +01:00
rvcas 6440c4f498
fix(codegen): tuple pattern scopes
Co-authored-by: Kasey White <kwhitemsg@gmail.com>
2023-03-09 19:30:52 -05:00
waalge fa55a4173c fix: gh actions bump cargo2nix unstable 2023-03-09 09:48:38 +00:00
waalge 6817510e2d Merge branch 'main' into waalge/bump-cargo2nix 2023-03-09 09:44:11 +00:00
waalge 993d1f1187 merge 2023-03-09 09:41:33 +00:00
Kasey White f377d60085 ChooseData is now lazy with its branch arguments.
This enables calling the un_data builtins directly from choose_data args
2023-03-09 00:31:57 -05:00
KtorZ dbef4474fa Add new acceptance scenario: 065
-> 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.
2023-03-09 00:31:57 -05:00
rvcas 553eb88d3d fix(check): record field access properly restricted to single constr types 2023-03-08 23:50:16 -05:00
rvcas ba4635a8b0
chore: update changelog 2023-03-08 22:50:03 -05:00
rvcas 41e725152e
feat(unify): cannot cast between string and data closes #432 2023-03-08 22:47:38 -05:00
Kasey White c85240cbed Fix exception when doing expect boolean = ..
Add new Air Assert Bool
Add acceptance test 76
2023-03-08 22:31:30 -05:00
rvcas 6cde0628a7 fix(check): filter tests before code gen
Co-authored-by: Kasey White <kwhitemsg@gmail.com>
2023-03-08 20:58:27 -05:00
KtorZ a66c9bd2c3
Remove redundant match on tuple blueprint generation. 2023-03-08 16:40:03 +01:00
KtorZ 2c987e289d
Fix 'find_modules_prefix' when generating docs. 2023-03-08 12:28:01 +01:00
waalge e8feb10505 chore: bump rust version in nix
- Had to move to cargo2nix/unstable;
the previous release topped out at 1.61.0,
but dependency `clap_lex v0.3.2` requires >= 1.64.0
2023-03-08 11:03:50 +00:00
KtorZ ab32302117
Only generate documentation of current package with 'docs'
This was generating documentation for ALL packages including dependencies.
2023-03-08 12:00:59 +01:00
KtorZ 0ea4538cac
Fix typo and pluralize message for invalid field arity error. 2023-03-08 11:44:54 +01:00
Matthias Benkort 2aa8a7f973
Merge pull request #424 from aiken-lang/patch/cargo.nix
Update Cargo.nix
2023-03-08 11:40:05 +01:00
Matthias Benkort d8934b3d8d
Merge pull request #421 from aiken-lang/monomorph-panic-fix
Functions with only a generic return weren't being properly monomorph…
2023-03-08 11:39:50 +01:00
Kasey White 89373c32e6
Functions with only a generic return weren't being properly monomorphized. Fixed that. 2023-03-08 10:31:05 +01:00
KtorZ 4a8e756f88 [create-pull-request] automated change 2023-03-08 09:26:01 +00:00
Matthias Benkort 95997822dc
Merge pull request #422 from aiken-lang/rvcas/json_output_cmds
JSON output for `uplc` cmds
2023-03-08 10:24:05 +01:00
rvcas f8545854fc
feat: json output for uplc eval 2023-03-08 10:19:36 +01:00
rvcas bd7b8792bf
feat: introduce EvalResult type 2023-03-08 10:19:36 +01:00