Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ groovy ./stepX_YYY.groovy

### Hare

The hare implementation was tested against Hare 0.25.2.
The hare implementation was tested against Hare 0.26.1.

```
cd impls/hare
Expand Down
2 changes: 1 addition & 1 deletion impls/hare/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM debian:testing
MAINTAINER Lou Woell <lou@reptitions.de>
LABEL org.opencontainers.image.source=https://github.com/kanaka/mal
LABEL org.opencontainers.image.description="mal test container: hare"
LABEL org.opencontainers.image.description="mal test container: hare 0.26.1"

##########################################################
# General requirements for testing or common across many
Expand Down
4 changes: 2 additions & 2 deletions impls/hare/mal/core.ha
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ use strings;
use bufio;
use time;

export type ns_entry = (str, (MalType | *fn([]MalType) (MalType | error)));
export type ns_entry = (str, (MalType | *fn(_: []MalType) (MalType | error)));
export type namespace = []ns_entry;

export fn load_namespace(ns: namespace, env: *env) (void | error) = {
for(let e.. ns){
let v: MalType = match(e.1){
case let v: MalType =>
yield v;
case let f: *fn([]MalType) (MalType | error) =>
case let f: *fn(_: []MalType) (MalType | error) =>
yield make_intrinsic(f);
case =>
return ("MalType", nil): type_error;
Expand Down
2 changes: 1 addition & 1 deletion impls/hare/mal/hashmap.ha
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ fn hm_key_list(hm: hashmap) list = {

export fn eval_hash(
hm: hashmap,
eval: *fn(MalType, *env) (MalType | error),
eval: *fn(_: MalType, _: *env) (MalType | error),
env: *env,
) (hashmap | error) = {

Expand Down
4 changes: 1 addition & 3 deletions impls/hare/mal/tokenizer.ha
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ use strings;
use strconv;
use ascii;

type undefined = !void;

type comment = str;

type list_beg = void;
Expand All @@ -29,7 +27,7 @@ type quote_tk = ( unquote_splice | unquote | quote | quasiquote | at);

type word = str;

type token = (int | str | io::EOF | undefined | ...coll_beg | mal_meta |
type token = (int | str | io::EOF | ...coll_beg | mal_meta |
...quote_tk | vec_beg | ...coll_end | comment | word);

type tokenizer = struct {
Expand Down
12 changes: 6 additions & 6 deletions impls/hare/mal/types.ha
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ export type string = *struct {
};

export type intrinsic = *struct {
eval: *fn([]MalType) (MalType | error),
eval: *fn(_: []MalType) (MalType | error),
meta: MalType,
};

export type function = *struct {
eval: *fn(MalType, *env) (MalType | error),
eval: *fn(_: MalType, _: *env) (MalType | error),
envi: *env,
args: []MalType,
body: MalType,
Expand All @@ -45,11 +45,11 @@ export type MalType = (macro | function | intrinsic | atom | bool |
// Envs & Hashmaps are treated separately in their implementation files.

export fn make_intrinsic(
func: *fn([]MalType) (MalType | error),
func: *fn(_: []MalType) (MalType | error),
) intrinsic = {

const new = alloc(struct {
eval: *fn([]MalType) (MalType | error) = func,
eval: *fn(_: []MalType) (MalType | error) = func,
meta: MalType = nil,
})!;

Expand All @@ -58,7 +58,7 @@ export fn make_intrinsic(
};

export fn make_func(
eval: *fn(MalType, *env) (MalType | error),
eval: *fn(_: MalType, _: *env) (MalType | error),
envi: *env,
args: []MalType,
body: MalType,
Expand All @@ -71,7 +71,7 @@ export fn make_func(
};

const new = alloc(struct{
eval: *fn(MalType, *env) (MalType | error) = eval,
eval: *fn(_: MalType, _: *env) (MalType | error) = eval,
envi: *env= envi,
args: []MalType = arg_list,
body: MalType = body,
Expand Down
Loading