Commit Graph

283 Commits

Author SHA1 Message Date
KtorZ 4fb13af49f
Fix type reification of PRNG. 2024-09-13 18:34:53 +02:00
microproofs debbae4fda
Update Changelog 2024-09-13 12:09:11 -04:00
KtorZ 74d197077d
Mention Riley contribution in CHANGELOG. 2024-09-10 13:23:16 +02:00
KtorZ 7741be64f8
Fix validator's fallback handler generation
Fixes #1015.
2024-09-10 10:48:06 +02:00
KtorZ 616dec8f03
Fix formatter getting rid of curly braces around multi-line constants. 2024-09-08 16:23:41 +02:00
KtorZ 0c0369ad61
Fix needed parentheses under trace-if-false disappearing when formatting. 2024-09-08 16:21:45 +02:00
KtorZ b6d99142f9
Fix formatting of multi-line alternative patterns. 2024-09-08 13:11:53 +02:00
KtorZ b7ea6ea391
Fix list-pattern formatting 2024-09-07 14:50:47 +02:00
KtorZ 19e30b10f9
Fix #1013 2024-09-06 12:28:12 +02:00
Matthias Benkort 1f692bc93e
Update CHANGELOG.md 2024-09-03 23:30:18 +02:00
KtorZ f60df16bc2
Preserve type-aliases during blueprint generation. 2024-09-03 16:39:50 +02:00
KtorZ 5414fd8f04
Fill-in CHANGELOG for zero-arg / super-const. 2024-08-30 18:41:06 +02:00
KtorZ 70e760cbaa
Fill-in CHANGELOG regarding last expect and tests now accepting Void. 2024-08-23 16:04:40 +02:00
KtorZ d1ee90a3a0
Update CHANGELOG.md 2024-08-23 10:41:20 +02:00
KtorZ 39c1b5a68a
Merge branch 'generated-docs-improvements' 2024-08-22 16:41:54 +02:00
Matthias Benkort 2bb2f11090
Update CHANGELOG.md 2024-08-14 10:03:42 +02:00
KtorZ 9d8fdf787c
Improve formatter on long-lines, in particular bin-ops. 2024-08-06 19:25:35 +02:00
KtorZ e3b1cf1093
Rework CHANGELOG to reflect reality.
We never released 1.0.30, so it's a bit misleading to have an entry for it in the CHANGELOG. So I merged its content with the ongoing release which is likely to be 1.1.0
2024-08-06 10:50:15 +02:00
KtorZ a07f8cbc58
Fill-in CHANGELOG. 2024-08-04 14:48:03 +02:00
KtorZ f14dfdf8e1
Allow pattern-matching on bytearrays
- Doesn't allow pattern-matching on G1/G2 elements and strings,
    because the use cases for those is unclear and it adds complexity to
    the feature.

  - We still _parse_ patterns on G1/G2 elements and strings, but emit an
    error in those cases.

  - The syntax is the same as for bytearray literals (i.e. supports hex,
    utf-8 strings or plain arrays of bytes).
2024-08-03 13:51:36 +02:00
KtorZ ea032c90f2
Add missing CHANGELOG entries. 2024-08-02 12:08:25 +02:00
KtorZ bf5a406ffb Remove clause guards.
Closes #886.
2024-08-02 00:16:27 -04:00
KtorZ b28d4a6e9f
Add input reference to ReferenceInputNotFound error.
Fixes #974.
2024-08-01 15:29:39 +02:00
KtorZ 91aa435f37
Fix 'multiline' truncating last character of each line.
Fixes #987.
2024-08-01 15:20:43 +02:00
KtorZ 327449e320
Update CHANGELOG, bump date, document latest fixes & optimizations 2024-07-25 09:54:03 +02:00
KtorZ 987a5fa779
Set a date for v1.0.30-alpha release. 2024-07-24 09:39:48 +02:00
rvcas 06ac851458
chore: update changelog 2024-07-23 11:20:42 -04:00
KtorZ 89890f3b4b
Fill-in CHANGELOG 2024-07-19 12:44:12 +02:00
KtorZ 976262c2e6
Allow discard in expect.
Fixes #967.
2024-07-17 18:11:09 +02:00
KtorZ 858dfccc82
Authorize complete patterns as function args.
This is mainly a syntactic trick/sugar, but it's been pretty annoying
  to me for a while that we can't simply pattern-match/destructure
  single-variant constructors directly from the args list. A classic
  example is when writing property tests:

  ```ak
  test foo(params via both(bytearray(), int())) {
    let (bytes, ix) = params
    ...
  }
  ```

  Now can be replaced simply with:

  ```
  test foo((bytes, ix) via both(bytearray(), int())) {
    ...
  }
  ```

  If feels natural, especially coming from the JavaScript, Haskell or
  Rust worlds and is mostly convenient. Behind the scene, the compiler
  does nothing more than re-writing the AST as the first form, with
  pre-generated arg names. Then, we fully rely on the existing
  type-checking capabilities and thus, works in a seamless way as if we
  were just pattern matching inline.
2024-06-07 15:42:25 +02:00
KtorZ 257bd23019
update changelog 2024-06-06 11:21:17 +02:00
KtorZ 87f4ed359b
Update changelog: set a release date. 2024-06-06 11:19:33 +02:00
KtorZ d7ec2131ef
Automatically merge import lines from same module.
I slightly altered the way we parse import definitions to ensure we
  merge imports from the same modules (that aren't aliased) together.

  This prevents an annoying warning with duplicated import lines and
  makes it just more convenient overall.

  As a trade-off, we can no longer interleave import definitions with
  other definitions. This should be a minor setback only since the
  formatter was already ensuring that all import definitions would be
  grouped at the top.

  ---

  Note that, I originally attempted to implement this in the formatter
  instead of the parser. As it felt more appropriate there. However, the
  formatter operates on (unmutable) borrowed definitions, which makes it
  annoyingly hard to perform any AST manipulations. The `Document`
  returns by the format carries a lifetime that prevents the creation of
  intermediate local values.

  So instead, slightly tweaking the parser felt like the right thing to
  do.
2024-06-04 10:48:42 +02:00
KtorZ 2070576e46
New LSP quickfix for 'use let' warning. 2024-05-30 19:30:41 +02:00
KtorZ 649e5163fc
Fix parsing of single hex-digits. 2024-05-30 17:19:48 +02:00
KtorZ 5694d9f9cb
Introduce 'fail once' and alter behavior of 'fail' keyword for properties. 2024-05-30 17:18:50 +02:00
rvcas 2605dc6aa4
chore: update changelog 2024-05-23 16:44:50 -04:00
rvcas 3f46559dbe
chore: update changelog 2024-05-23 16:21:16 -04:00
microproofs 2c8abe4a69 update changelog 2024-05-23 16:15:30 -04:00
KtorZ c48f15a957
revert #903 'feat: Emit keyword'
While we agree on the idea of having some ways of emitting events, the
  design hasn't been completely fleshed out and it is unclear whether
  events should have a well-defined format independent of the framework
  / compiler and what this format should be.

  So we need more time discussing and agreeing about what use case we
  are actually trying to solve with that.

  Irrespective of that, some cleanup was also needed on the UPLC side
  anyway since the PR introduced a lot of needless duplications.
2024-05-23 17:22:12 +02:00
KtorZ 5ce30b2632
Rename AList -> Pairs due to popular demand. 2024-05-23 16:45:40 +02:00
KtorZ 1ed4fa1c69
Show warning when ignoring modules + restyle warnings slightly
Fixes #916.
2024-05-14 13:27:19 +02:00
KtorZ 81219cfbdd
Check for data-type serialisability after generic instantiation
Fixes #939.
2024-05-14 10:58:58 +02:00
KtorZ 8c67be55ce
Fixes #921: top-level Miller-loop needs not to be serialisable
This is a bit tricky, but in a similar way where we allow functions to
  be returned by functions, this must also work for MillerLoopResult.
2024-05-10 13:52:23 +02:00
microproofs 30436a8a9c update changelog 2024-05-06 15:17:01 -04:00
KtorZ 925a11be69
Check for args length when comparing types. Duh!
Fixes #917.
2024-05-01 10:48:15 +02:00
rvcas 4f99c81dee
chore: update changelog 2024-04-12 21:43:28 -04:00
rvcas 23713ce6fa
chore: update changelog 2024-04-09 11:48:32 -04:00
rvcas fdbe811bf1
chore: update changelog 2024-04-02 19:49:30 -04:00
rvcas 0ba6d23efa
chore: update changelog 2024-04-02 17:56:53 -04:00
rvcas 98bd61a0cd
chore: update changelog 2024-03-29 11:38:22 -04:00
rvcas 54a89d3e69
chore: update changelog 2024-03-25 22:05:25 -04:00
KtorZ eee1d1bf1e
Fix release date for v1.0.25-alpha. 2024-03-22 16:07:29 +01:00
KtorZ 96387e3437
Fixes #767
Co-authored-by: @rvcas <x@rvcas.dev>
2024-03-22 16:05:32 +01:00
rvcas 80858387f6
chore: update changelog 2024-03-21 20:20:31 -04:00
microproofs 61936cb91e fix(codegen): Add tracing when checking for a constr vs another primitive 2024-03-17 16:25:17 -04:00
rvcas cc99eceda8 chore: update changelog 2024-03-12 08:10:33 -04:00
KtorZ df898bf239
Rework monadic-bind into function backpassing.
This is more holistic and less awkward than having monadic bind working only with some pre-defined type. Backpassing work with _any_ function, and can be implemented relatively easily by rewriting the AST on-the-fly.

  Also, it is far easier to explain than trying to explain what a monadic bind is, how its behavior differs from type to type and why it isn't generally available for any monadic type.
2024-03-11 00:16:22 +01:00
Matthias Benkort ec18127191
Merge pull request #869 from aiken-lang/non-serialisable-types
Forbid non-serializable inhabitants in compound data-types.
2024-03-09 22:39:41 +01:00
KtorZ 80a9393db7
Add --include-dependencies to 'aiken docs'
Fixes #867.
2024-03-09 22:35:38 +01:00
KtorZ ee54266d1f
Forbid non-serializable inhabitants in compound data-types. 2024-03-09 22:25:51 +01:00
KtorZ 37627e3527
Fix indentation of pipelines. 2024-03-09 20:44:51 +01:00
microproofs cf86a20256 update Changelog 2024-03-09 13:27:32 -05:00
KtorZ 22b86a5f82
Add --max-success for running more or less prop runs on demand. 2024-03-09 19:17:57 +01:00
KtorZ d581183cc6
Fix formatter discarding nul bytes. 2024-03-09 18:59:35 +01:00
KtorZ bbe7c0bc01
report prop test coverage labels on success. 2024-03-09 01:28:29 +01:00
KtorZ d6cc9bdfbe
Allow implicit discard when right-hand side is Void.
This is the most intuitive/expected behavior. Otherwise, it forces a pointless let-binding to 'Void' or into a discard.
2024-03-09 01:28:29 +01:00
rvcas d73f8fd6c2 chore: update changelog 2024-03-08 19:19:07 -05:00
rvcas 49ca7e1f75
chore: update changelog 2024-03-08 16:21:48 -05:00
microproofs 64f580bb82 one more change to the changelog 2024-03-08 12:19:18 -05:00
microproofs 9636a4de03 update changelog 2024-03-08 11:18:50 -05:00
KtorZ 4c97240900
Fill-in CHANGELOG about associativity. 2024-03-07 01:31:04 +01:00
KtorZ bff822ea7f
Rework unit test report to leverage new reification
And also provide slightly better errors when traces, or trace-if-false operators are present.
2024-03-07 01:20:40 +01:00
KtorZ c2bc5848dd
Fill-in CHANGELOG. 2024-03-03 21:09:17 +01:00
KtorZ 46c357df7b Fix Int/BigInt pivot
We've been wrongly representing large ints as BigInt, causing them to
  behave differently in the VM through builtins like 'serialise_data'.

  Indeed, we expect anything that fits in 8 bytes to be encoded as Major
  Type 0 or 1. But we were switching to encoding as Major type 6
  (tagged, PosBigInt, NegBigInt) for much smaller values! Anything
  outside of the range [-2^32, 2^32-1] would be treated as big int
  (positive or negative).

  Why? Because we checked whether a value i would fit in an i64, and if
  it didn't we treated it as big int. But the reality is more subtle...
  Fortunately, Rust has i128 and the minicbor library implements TryFrom
  which enforces that the value fits in a range of [-2^64, 2^64 - 1], so
  we're back on track easily.
2024-02-25 14:09:56 -05:00
microproofs cf51b30045 update changelog 2024-02-07 11:48:52 -05:00
rvcas b46206bfe2
chore: update changelog 2024-01-31 13:47:07 -05:00
microproofs bcc2a0fd12 update changelog 2024-01-31 13:44:11 -05:00
microproofs 258c224e21 update changelog 2024-01-31 13:42:46 -05:00
rvcas 3a534271e7
chore: update changelog 2024-01-30 12:35:50 -05:00
microproofs 115ff61abe update changelog again 2024-01-25 14:22:45 -05:00
rvcas 9d563612f3
chore: prep changelog for release 2024-01-24 20:40:53 -05:00
microproofs 4c00c9e7de update changelog 2024-01-24 20:03:57 -05:00
microproofs 1431bec32f update changelog 2024-01-24 19:50:52 -05:00
rvcas 25a837ab3f
feat: parser and check fixes
- do not erase sequences if the sole expression is an assignment
- emit parse error if an assignment is assigned to an assignment
- do not allow assignments in logical op chains
2024-01-19 14:32:21 -05:00
KtorZ 8a90e9eda0
Improve behavior and reporting of tests expected to fail
Fixes #786.
2024-01-19 18:20:58 +01:00
KtorZ 858e45f3f3
Fill-in CHANGELOG. 2024-01-19 14:30:43 +01:00
KtorZ 0e2b8ae251
Bump pallas dependencies to include flat bigint patch
Fixes #796.
2024-01-18 18:26:21 +01:00
rvcas 0a1e0d7bee
feat: remove flat-rs crate and use it through pallas_codec 2023-12-04 22:01:51 -05:00
rvcas b17b7f287c
chore: update to pallas v0.20.0 2023-12-04 21:44:19 -05:00
rvcas 38e8255328
chore: update changelog 2023-12-04 21:04:55 -05:00
KtorZ a23bc32fa2
Fill-in CHANGELOG. 2023-11-25 15:14:10 +01:00
microproofs d2202a705c update changelog 2023-10-25 18:59:44 -04:00
KtorZ 5f8e256050
Present aiken-lsp & fill-in CHANGELOG 2023-10-21 21:39:30 +02:00
microproofs a08405c607 changelog additions 2023-10-17 12:36:13 -04:00
KtorZ a524836c94
Add compiler version & system information to panic error message
So that we stop constantly asking people about it.
2023-10-06 14:46:11 +02:00
KtorZ 524d0dadf5
Add compiler's version to blueprint. 2023-10-06 14:17:55 +02:00
microproofs 8a1c824dd7 chore: add specific error for when the validator returns false 2023-10-04 11:08:22 -04:00
rvcas 78ff6cf178 chore: update changelog 2023-10-03 01:17:15 -04:00
microproofs d131ec563b update changelog 2023-09-29 22:07:19 -04:00