KtorZ
287fbf2e3b
Add new acceptance test scenario (018)
...
```
Error: examples/acceptance_tests/018/lib/test.ak
× or_else_2 failed
help: ┍━ left ━━━━━━━━━━━┑
│ (con data #182a) │
┕━━━━━━━━━━━━━━━━━━┙
should be equal to
┍━ right ━━━━━━━━━━┑
│ (con integer 42) │
┕━━━━━━━━━━━━━━━━━━┙
```
2022-12-19 00:41:27 -05:00
KtorZ
6e46e7562e
Add new acceptance test scenario (017)
...
```
Error:
× Main thread panicked.
├─▶ at /Users/ktorz/Documents/Projects/aiken-lang/aiken/crates/project/src/lib.rs:596:22
╰─▶ called `Result::unwrap()` on an `Err` value: FreeUnique(Name { text: "test_slice", unique:
Unique(6) })
```
2022-12-19 00:41:27 -05:00
KtorZ
00b800c456
Add new acceptance test scenario (016)
...
```
Error:
× Main thread panicked.
├─▶ at /Users/ktorz/Documents/Projects/aiken-lang/aiken/crates/project/src/lib.rs:616:36
╰─▶ called `Result::unwrap()` on an `Err` value: FreeUnique(Name { text: "test_slice", unique:
Unique(7) })
```
2022-12-19 00:41:27 -05:00
rvcas
53bc9aa56f
fix: properly capture empty lines
2022-12-15 11:12:35 -05:00
KtorZ
bd956efd36
Rework acceptance test 014 to smaller reproducible scenario
2022-12-14 10:20:43 +01:00
KtorZ
7c54283e69
Add new acceptance test scenario (015)
...
```
Error:
× Main thread panicked.
├─▶ at crates/lang/src/uplc.rs:2388:21
╰─▶ not yet implemented
```
2022-12-14 10:20:43 +01:00
KtorZ
95df5f9137
Add new acceptance test scenario (014)
2022-12-14 09:45:26 +01:00
KtorZ
bc7c236b3b
Add new acceptance test scenario (013)
...
```
ERROR:
The provided Plutus code called 'error'
```
2022-12-14 09:45:25 +01:00
KtorZ
9c902cdf89
Add new acceptance test scenario (012)
...
```
Error:
× Main thread panicked.
├─▶ at crates/lang/src/uplc.rs:3413:34
╰─▶ internal error: entered unreachable code: Var {
scope: [
0,
1,
3,
24,
25,
29,
32,
],
constructor: ValueConstructor {
public: false,
variant: LocalVariable {
location: 46..62,
},
tipo: Fn {
args: [
Var {
tipo: RefCell {
value: Link {
tipo: App {
public: true,
module: "",
name: "Int",
args: [],
},
},
},
},
],
ret: App {
public: true,
module: "",
name: "Bool",
args: [],
},
},
},
name: "f",
variant_name: "",
}
```
2022-12-14 09:45:25 +01:00
KtorZ
f53caff538
Add new acceptance test scenario (011)
...
```
Error:
× Main thread panicked.
├─▶ at crates/lang/src/uplc.rs:4022:40
╰─▶ called `Option::unwrap()` on a `None` value
```
2022-12-14 09:45:25 +01:00
rvcas
299cd1ac24
fix: tuples
2022-12-14 09:45:25 +01:00
KtorZ
37def91fc5
Add new acceptance test scenario (010)
...
```
Error:
× Main thread panicked.
├─▶ at crates/lang/src/uplc.rs:688:33
╰─▶ called `Option::unwrap()` on a `None` value
help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
```
2022-12-14 09:45:24 +01:00
KtorZ
4217fd06b5
Add new acceptance test scenario (009)
...
Note: the problem is only present when importing a builtin explicitly.
When using a qualified import, it compiles fine.
```
Error:
× Main thread panicked.
├─▶ at crates/lang/src/uplc.rs:3264:35
╰─▶ called `Option::unwrap()` on a `None` value
help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
```
2022-12-14 09:45:24 +01:00
KtorZ
adf34e9dc6
Add new acceptance test scenario (008)
...
```
Error:
× Main thread panicked.
├─▶ at crates/lang/src/uplc.rs:530:41
╰─▶ not yet implemented
help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
```
2022-12-14 09:45:24 +01:00
KtorZ
022fc36dd2
Add new (failing) acceptance test (007)
...
```
Error: aiken::check
× Checking
╰─▶ Not a function
╭─[./007/lib/test.ak:4:1]
4 │ [(a, b), ..rest] -> {
5 │ let (a_tail, b_tail) = unzip(rest)
· ──────
6 │ ([a, ..a_tail], [b, ..b_tail])
╰────
```
2022-12-14 09:45:24 +01:00
KtorZ
a62fb1905e
rename examples/tests/{a,b,c,d,e,f} into examples/acceptance_tests/00{1,2,3,4,5,6}
...
Also added a little Makefile to run them all in one go.
2022-12-14 09:45:24 +01:00
KtorZ
b294063097
Add another acceptance test (f)
...
```
Error:
× Main thread panicked.
├─▶ at crates/lang/src/uplc.rs:4043:46
╰─▶ not yet implemented
help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
```
2022-12-14 09:45:24 +01:00
KtorZ
603f4a6385
Add another failing example (e)
...
```
Error:
× Main thread panicked.
├─▶ at crates/lang/src/uplc.rs:1518:45
╰─▶ called `Option::unwrap()` on a `None` value
help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
```
2022-12-14 09:45:24 +01:00
KtorZ
572121974e
Update generic syntax in tests.
2022-12-14 09:45:23 +01:00
KtorZ
8f69a4b600
Add another failing test example (d)
...
```
Error:
× Main thread panicked.
├─▶ at crates/lang/src/uplc.rs:3264:35
╰─▶ called `Option::unwrap()` on a `None` value
help: set the `RUST_BACKTRACE=1` environment variable to display a backtrace.
```
2022-12-14 09:45:23 +01:00
Kasey White
d78e2c9c6f
feat: finish up generic match cases
2022-12-14 09:45:23 +01:00
rvcas
77386893d7
test: actually repeat
2022-12-14 09:45:23 +01:00
KtorZ
04c05f8d63
Add some tests that make the compiler panick.
2022-12-14 09:45:22 +01:00
rvcas
69db9696d6
feat: prefix tuples with hash again cause ambguity with call
2022-12-13 10:27:17 -05:00
rvcas
6dc4738b66
feat: update formatter for new changes
2022-12-12 19:22:11 -05:00
rvcas
a4f6388eca
feat: remove the need for # in front of tuples
2022-12-12 19:22:11 -05:00
rvcas
2ba712eef6
feat: start adding padding to test output
2022-12-08 19:25:28 -05:00
rvcas
e9d8e1d317
feat: print budget consumed by test
2022-12-08 19:25:24 -05:00
KtorZ
bc785673b2
Fix compilation errors for the newly introduce test & add type inference.
...
Tests are basically functions for which the return type should unify with bool. In principle, the type checker could also check that a test function has no arguments but, a test function with arguments wouldn't parse in the first place; feels a bit hacky but it works when considering the pipeline as a whole.
Note that the code generation is still to be done.
2022-12-08 19:24:20 -05:00
Kasey White
80a9b7b36a
feat: add map support and tuple deconstruction in let
2022-12-08 14:28:30 -05:00
Kasey White
2f7131e9b8
feat: add tuples and streamline conversion of types to and from data
2022-12-07 08:40:23 -05:00
rvcas
d8ff574045
chore: nuke stdlib from main repo
2022-12-06 22:26:07 -05:00
rvcas
45990f1f84
feat: unify tuples and stdlib updates
2022-12-06 22:23:40 -05:00
Kasey White
3f47a1f4b8
fix: constr issue
...
- also fixed constant parsing
- added new cbor flag to eval
Co-authored-by: rvcas <x@rvcas.dev>
2022-12-05 22:55:57 -05:00
rvcas
7875af7d35
feat: better errors for incorrect contructor making
2022-12-05 18:11:04 -05:00
rvcas
7e6dc978a1
feat: commit latest build assets for sample
2022-12-05 14:18:44 -05:00
Kasey White
3e68204768
replace uplc with uplc_two and move structs over
2022-12-05 14:18:44 -05:00
Kasey White
0fda535c50
feat: add module constants except for tuple
2022-12-05 14:18:44 -05:00
Kasey White
de9302a877
feat: finish list destructure in when matches
2022-12-05 14:18:44 -05:00
Kasey White
f48039fd4f
Add ability to generate ir with complex constructor cases
2022-12-05 14:18:44 -05:00
Kasey White
64cbae938d
Add clause guard to IR and use it for complex clauses
2022-12-05 14:18:44 -05:00
Kasey White
044d609a24
feat: nested constr access and module funcs now work
2022-12-05 14:18:44 -05:00
Kasey White
3d3beef7d4
feat: uplc code gen for functions and minor recursion fix
2022-12-05 14:18:44 -05:00
Kasey White
8f984ad131
fix up function definitions in the IR
2022-12-05 14:18:44 -05:00
Kasey White
02ee129615
feat: function insertion IR done, code gen will be easy
2022-12-05 14:18:44 -05:00
rvcas
4129cf92c9
chore: commit assets
2022-12-05 14:18:44 -05:00
Kasey White
29a30aa61f
feat: finished when constr is for IR and code gen
2022-12-05 14:18:44 -05:00
Kasey White
3fb3a3240a
checkpoint
2022-12-05 14:18:44 -05:00
Kasey White
8b24a66b7e
add field access and list patterns are finished
...
Co-authored-by: rvcas <x@rvcas.dev>
2022-12-05 14:18:44 -05:00
Kasey White
abe29a3883
make progress on list deconstruction with IR
2022-12-05 14:18:44 -05:00
Kasey White
2a00b896fc
create ir and start to replace plutus code gen with ir
2022-12-05 14:18:44 -05:00
rvcas
9ebc836b89
feat: handle punning in a non-ambiguous way
2022-12-04 21:12:29 -05:00
rvcas
391849bf37
feat: parser improvements
...
- record creation with punning
- disambiguate if condition from record creation with punning
- split parser tests up into many smaller ones
2022-12-04 21:12:29 -05:00
rvcas
5ec93a8692
feat: format bytearrays
2022-12-01 15:28:15 -05:00
rvcas
fedafed845
feat: add module constants
2022-12-01 15:28:15 -05:00
rvcas
34c8a58391
feat: complete language tour
2022-11-30 15:35:55 -05:00
rvcas
0823b78bf8
feat: some new features
...
- tuples `#(Int, Int)`
- `trace` and `trace("text")`
2022-11-28 22:33:53 -05:00
rvcas
d5087dbcc7
fix: it's more consistent to have snakecase builtins
2022-11-24 18:36:22 -05:00
Kasey White
6babebde28
feat: support self recursion functions and fix making constrs
2022-11-24 15:19:32 -05:00
KtorZ
fc66c2611b
Implement a foundation for the aiken standard library for lists.
2022-11-24 10:10:32 -05:00
rvcas
a70ebb5c32
chore: format swap file
2022-11-23 21:09:06 -05:00
Kasey White
dc510b1c7a
feat: finish list deconstruct
2022-11-23 17:57:02 -05:00
Kasey White
e496591ded
checkpoint
2022-11-23 17:57:02 -05:00
Kasey White
f09a3bd121
feat:list construction, no pairs yet
2022-11-23 17:57:02 -05:00
rvcas
89153a4d82
allow single var patterns to double as a label in records
2022-11-17 12:56:03 -05:00
alessandrokonrad
6c5ec9bb25
Extended ScriptContext; added Option to builtins
2022-11-16 21:34:46 -05:00
rvcas
72bf27d467
fix: better constructor pattern parsing
2022-11-16 21:30:43 -05:00
rvcas
ef9fd15e12
chore: remove loose println!
2022-11-16 14:49:06 -05:00
rvcas
f7313ee61a
feat: some parsing for comments
2022-11-16 14:28:02 -05:00
Kasey White
f10c78d800
feat: when statements with field access now work
2022-11-16 13:11:24 -05:00
rvcas
57df303eae
feat(aiken_stdlib): add validity_range
2022-11-16 13:10:55 -05:00
KtorZ
5412bff9da
Continue defining ScriptPurpose in the standard lib.
2022-11-16 13:10:55 -05:00
rvcas
8200afa00e
feat(aiken_stdlib): add Hash alias and ScriptPurpose
2022-11-16 13:10:55 -05:00
KtorZ
f63da1a367
Draft a few more core types for ScriptContext / Transaction
...
Interesting points:
- We don't have tuples yet, so we fake it until we make it.
- Aliases are 'order-sensitive', especially if an alias uses another not-yet-declared alias.
2022-11-16 13:10:55 -05:00
rvcas
771e011630
feat(aiken_stdlib): add script context type
2022-11-16 13:10:55 -05:00
rvcas
bff99b0cf2
feat: publish errors as lsp diagnostic messages
2022-11-15 17:44:50 -05:00
Kasey White
2cac7963c3
feat: add complex function composability. Minor scope changes
2022-11-14 14:13:21 -05:00
Kasey White
d11b8858ba
clean up some unused parts in created hashmaps
2022-11-12 20:57:44 -05:00
Kasey White
b450c41438
finish up binops for code gen
2022-11-12 20:57:44 -05:00
Kasey White
a3935c5df7
almost done data constr creation
2022-11-11 20:24:21 -05:00
KtorZ
98f90a572f
Add is_empty, preprend to standard lib / bytearray
2022-11-10 17:41:39 -05:00
rvcas
9f374d9431
feat: add length and concat to aiken/bytearray
2022-11-10 17:41:39 -05:00
KtorZ
b7edb7e584
Draft first standard module for ByteArray
2022-11-10 17:41:39 -05:00
rvcas
c9da049712
feat: rework how modules are loaded
2022-11-10 17:41:39 -05:00
rvcas
e421b49ab2
chore: forgot to commit the script
2022-11-08 22:21:07 -05:00
rvcas
7e0767ef74
feat: output build assets
2022-11-08 22:21:07 -05:00
Kasey White
6c6aefd1c4
get basic when conditions to work
2022-11-08 22:21:07 -05:00
Kasey White
6950b66b55
checkpoint commit
2022-11-08 22:21:07 -05:00
Kasey White
28697586f2
remove some warnings and start on when
2022-11-08 22:21:07 -05:00
Kasey White
805bf19081
Got nested field access working efficiently. Will clean up code soon.
2022-11-08 22:21:07 -05:00
Kasey White
e3fa9ac105
checkpoint commit
2022-11-08 22:21:07 -05:00
Kasey White
9864a3fe31
figured out the recursion based uplc terms to get item from a list
2022-11-08 22:21:07 -05:00
Kasey White
ad4a5e927d
starting on field access in aiken
2022-11-08 22:21:07 -05:00
Kasey White
3cafb2bcbe
checkpoint commit
2022-11-08 22:21:07 -05:00
Kasey White
6162128427
add string comparison and int comparison
2022-11-08 22:21:07 -05:00
Kasey White
f6a72cc7f9
did hacky way for scope level, but now i know how it works and how to fix
2022-11-08 22:21:07 -05:00
Kasey White
ffa78e4c30
work out some initial direction for code gen
2022-11-08 22:21:07 -05:00
rvcas
3a653b6624
chore: all dead code till we sort out doc comments
2022-11-05 18:20:23 -04:00
rvcas
7092673c45
feat: if expression formatting
2022-11-05 17:53:11 -04:00
rvcas
809d5ea5c5
fix: record formatting
2022-11-05 17:28:32 -04:00
rvcas
9d14acbe0a
fix: when formatting and add some methods to Project::Error
2022-11-05 16:23:46 -04:00
rvcas
14724f924c
fix: weird extra space above definitions
2022-11-05 15:42:53 -04:00
rvcas
cba7a6f46e
feat: bring over the formatter from gleam
2022-11-05 15:35:11 -04:00
rvcas
819256df99
feat: wrap up adding uplc builtins for now
2022-10-25 18:52:27 -04:00
rvcas
d5d2ba9cd7
feat: start creating aiken/builtin module
2022-10-25 18:52:27 -04:00
rvcas
a41d05f7b6
feat: change project structure
2022-10-24 00:09:00 -04:00
rvcas
825783ca61
feat: typecheck If expressions
2022-10-24 00:09:00 -04:00
rvcas
5244e58c9f
feat: typechecking is working
2022-10-24 00:09:00 -04:00
rvcas
4df3de0a03
feat: some boilerplate for typechecking
2022-10-24 00:09:00 -04:00
rvcas
da89e9902c
feat: starting to get pretty error messages
2022-10-11 14:34:27 -04:00
rvcas
6b79eb0961
chore: split example into lib and script
2022-10-09 15:39:28 -04:00
rvcas
ff26db2245
feat: start project building
2022-10-09 15:39:28 -04:00
rvcas
6de41e64be
feat: add simple check command
2022-10-04 17:09:43 -04:00