@dallaylaen/ski-interpreter 1.0.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +57 -0
- package/README.md +1 -0
- package/lib/expr.js +321 -235
- package/lib/parser.js +3 -0
- package/lib/quest.js +72 -16
- package/lib/util.js +10 -6
- package/package.json +11 -4
- package/types/lib/expr.d.ts +75 -46
- package/types/lib/quest.d.ts +29 -7
- package/types/lib/util.d.ts +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.1.0] - 2025-12-07
|
|
9
|
+
|
|
10
|
+
### BREAKING CHANGES
|
|
11
|
+
|
|
12
|
+
- Expr: canonize() renamed to guess(), output semantics changed
|
|
13
|
+
& returns nothing for non-normalizable terms.
|
|
14
|
+
Always check `result.normal` to be true.
|
|
15
|
+
- Expr: wantsArgs() removed.
|
|
16
|
+
- Quest: LinearCase class replaced with PropertyCase
|
|
17
|
+
supporting boolean properties `normal`, `proper`, `discard`, `duplicate`,
|
|
18
|
+
`linear`, and `affine`, and numeric `arity`.
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- Expr: guess() method to normalize terms.
|
|
22
|
+
Returns an object with `normal`: boolean and `steps`:
|
|
23
|
+
number properties, as well as optional `expr`: Expr -
|
|
24
|
+
equivalent lambda expression; `arity`: number,
|
|
25
|
+
and other properties.
|
|
26
|
+
- Expr: replace(terms: Expr[], options: {}) replaces
|
|
27
|
+
subtrees with matching canonical form (if they have one).
|
|
28
|
+
- Expr: expect(expr: Expr, comment: string?) now handles coments like proper assertion.
|
|
29
|
+
- Quest: PropertyCase class for matching based on term properties.
|
|
30
|
+
- Proper changelog
|
|
31
|
+
- Lots of new quests at https://dallaylaen.github.io/ski-interpreter/quest.html
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
- Expr: equals() and expect() handle aliases correctly.
|
|
35
|
+
- Expr: run() always executes at least 1 step.
|
|
36
|
+
- Quest: improve typedefs
|
|
37
|
+
- package.json: rely on `npx` instead of handwritten scripts, improve dev dependencies.
|
|
38
|
+
|
|
39
|
+
## [1.0.1] - 2025-07-18
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- README.md
|
|
44
|
+
|
|
45
|
+
## [1.0.0] - 2025-07-18
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
|
|
49
|
+
- Parser
|
|
50
|
+
- B, C, I, K, S, W
|
|
51
|
+
- Church numerals
|
|
52
|
+
- Lambdas as `x -> expr`
|
|
53
|
+
- Declare new terms `foo = expr`
|
|
54
|
+
- Quest engine
|
|
55
|
+
- Basically everything
|
|
56
|
+
|
|
57
|
+
|
package/README.md
CHANGED
|
@@ -130,6 +130,7 @@ REPL comes with the package as [bin/ski.js](bin/ski.js).
|
|
|
130
130
|
|
|
131
131
|
* "To Mock The Mockingbird" by Raymond Smulian.
|
|
132
132
|
* [combinator birds](https://www.angelfire.com/tx4/cus/combinator/birds.html) by [Chris Rathman](https://www.angelfire.com/tx4/cus/index.html)
|
|
133
|
+
* [Fun with combinators](https://doisinkidney.com/posts/2020-10-17-ski.html) by [@oisdk](https://github.com/oisdk)
|
|
133
134
|
|
|
134
135
|
# License and copyright
|
|
135
136
|
|