Skip to content

Commit

Permalink
Update (meevax core) and function core to refer to same environment
Browse files Browse the repository at this point in the history
Signed-off-by: yamacir-kit <[email protected]>
  • Loading branch information
yamacir-kit committed Apr 27, 2024
1 parent 743231e commit e5cec9c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 23 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.174_amd64.deb
sudo apt install build/meevax_0.5.175_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.174.so` and executable `meevax`
| `all` | Build shared-library `libmeevax.0.5.175.so` and executable `meevax`
| `test` | Test executable `meevax`
| `package` | Generate debian package `meevax_0.5.174_amd64.deb`
| `package` | Generate debian package `meevax_0.5.175_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.174
0.5.175
3 changes: 3 additions & 0 deletions include/meevax/kernel/syntactic_environment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,9 @@ inline namespace kernel
BINDING("define" , define ),
BINDING("define-syntax" , define_syntax ),
BINDING("if" , conditional ),
BINDING("implementation-dependent" , implementation_dependent ),
BINDING("include" , include ),
BINDING("include-case-insensitive" , include_case_insensitive ),
BINDING("install" , install ),
BINDING("lambda" , lambda ),
BINDING("let-syntax" , let_syntax ),
Expand Down
21 changes: 2 additions & 19 deletions src/kernel/boot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,25 +330,8 @@ inline namespace kernel

define<library>("(meevax core)", [](library & library)
{
using syntax = environment::syntax;

library.define<syntax>("begin", syntax::sequence);
library.define<syntax>("call-with-current-continuation!", syntax::call_with_current_continuation);
library.define<syntax>("current", syntax::current);
library.define<syntax>("define", syntax::define);
library.define<syntax>("define-syntax", syntax::define_syntax);
library.define<syntax>("if", syntax::conditional);
library.define<syntax>("implementation-dependent", syntax::implementation_dependent);
library.define<syntax>("include", syntax::include);
library.define<syntax>("include-case-insensitive", syntax::include_case_insensitive);
library.define<syntax>("install", syntax::install);
library.define<syntax>("lambda", syntax::lambda);
library.define<syntax>("let-syntax", syntax::let_syntax);
library.define<syntax>("letrec", syntax::letrec);
library.define<syntax>("letrec-syntax", syntax::letrec_syntax);
library.define<syntax>("quote", syntax::quote);
library.define<syntax>("quote-syntax", syntax::quote_syntax);
library.define<syntax>("set!", syntax::set);
library.second = cdr(environment::core()); // DIRTY HACK!
library.export_specs = map(car, library.second);
});

define<library>("(meevax environment)", [](library & library)
Expand Down
2 changes: 2 additions & 0 deletions test/environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ auto main() -> int

const_cast<object &>(interaction_environment()).reset(); // DIRTY HACK!

const_cast<object &>(environment::core()).reset(); // DIRTY HACK!

libraries().clear();

assert(libraries().empty());
Expand Down

0 comments on commit e5cec9c

Please sign in to comment.