Skip to content

Commit

Permalink
Lipsticks
Browse files Browse the repository at this point in the history
Signed-off-by: yamacir-kit <[email protected]>
  • Loading branch information
yamacir-kit committed Aug 4, 2024
1 parent c704ea0 commit 463fce9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 18 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Procedures for each standard are provided by the following R7RS-style libraries:
cmake -B build -DCMAKE_BUILD_TYPE=Release
cd build
make package
sudo apt install build/meevax_0.5.214_amd64.deb
sudo apt install build/meevax_0.5.215_amd64.deb
```

or
Expand Down Expand Up @@ -122,9 +122,9 @@ sudo rm -rf /usr/local/share/meevax

| Target Name | Description
|-------------|-------------
| `all` | Build shared-library `libmeevax.0.5.214.so` and executable `meevax`
| `all` | Build shared-library `libmeevax.0.5.215.so` and executable `meevax`
| `test` | Test executable `meevax`
| `package` | Generate debian package `meevax_0.5.214_amd64.deb`
| `package` | Generate debian package `meevax_0.5.215_amd64.deb`
| `install` | Copy files into `/usr/local` directly

## Usage
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.214
0.5.215
37 changes: 23 additions & 14 deletions include/meevax/kernel/syntactic_environment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,24 @@ inline namespace kernel
{
assert(use_environment.is<syntactic_environment>());

let const bound_variables = unify(car(macro_environment),
car(use_environment));

let const free_variables = map([&](let const& free_name)
{
return cons(free_name, use_environment);
},
free_names,
cdr(use_environment));

return macro_environment.as<syntactic_environment>()
.compile(expression,
unify(car(macro_environment),
car(use_environment)),
map([&](let const& free_name)
{
return cons(free_name, use_environment);
},
free_names,
cdr(use_environment)),
std::forward<decltype(xs)>(xs)...);
.generate(macro_environment.as<syntactic_environment>()
.expand(expression,
bound_variables,
free_variables),
bound_variables,
free_variables,
std::forward<decltype(xs)>(xs)...);
}

friend auto operator ==(syntactic_closure const& x, syntactic_closure const& y) -> bool
Expand All @@ -73,13 +80,13 @@ inline namespace kernel
as else in a cond clause. A macro definition for syntax-rules would
use free-identifier=? to look for literals in the input.
*/
return x.expression.is_also<identifier>() and
y.expression.is_also<identifier>() and
eqv(x.macro_environment.as<syntactic_environment>()
return x.expression.template is_also<identifier>() and
y.expression.template is_also<identifier>() and
eqv(x.macro_environment.template as<syntactic_environment>()
.identify(x.expression,
car(x.macro_environment),
nullptr),
y.macro_environment.as<syntactic_environment>()
y.macro_environment.template as<syntactic_environment>()
.identify(y.expression,
car(y.macro_environment),
nullptr));
Expand Down Expand Up @@ -1029,6 +1036,8 @@ inline namespace kernel
whereas it would be an error to perform a set! on an unbound
variable.
*/
assert(not variable.is<syntactic_closure>());

return car(second = cons(make<absolute>(variable, undefined), second));
}
}
Expand Down

0 comments on commit 463fce9

Please sign in to comment.