Commit 22f06a61 authored by Niels Möller's avatar Niels Möller
Browse files

Minir bug fixes.

Rev: src/command.c:1.8
Rev: src/command.h:1.10
parent 0404d514
......@@ -59,8 +59,8 @@ make_apply(struct command *f, struct command_continuation *c)
return &res->super.super;
struct lsh_object gaba_apply(struct lsh_object *f,
struct lsh_object *x)
struct lsh_object *gaba_apply(struct lsh_object *f,
struct lsh_object *x)
CAST_SUBTYPE(command_simple, cf, f);
return COMMAND_SIMPLE(cf, x);
......@@ -165,7 +165,6 @@ struct command *make_command_S_2(struct command *f,
return &res->super.super;
struct lsh_object *
/* Represents (S f) */
/* GABA:
......@@ -240,7 +239,7 @@ do_simple_command_K_1(struct command_simple *s,
struct command *make_command_K_1(struct lsh_object *x)
NEW(command_S_1, res);
NEW(command_K_1, res);
res->x = x;
res-> = do_call_simple_command;
res->super.call_simple = do_simple_command_K_1;
......@@ -248,6 +247,13 @@ struct command *make_command_K_1(struct lsh_object *x)
return &res->super.super;
static struct lsh_object *
do_simple_command_K(struct command_simple *ignored UNUSED,
struct lsh_object *a)
return &make_command_K_1(a)->super;
struct command_simple command_K = STATIC_COMMAND_SIMPLE(do_simple_command_K);
/* ((B f) g) x == (f (g x)) */
......@@ -84,23 +84,25 @@ int do_call_simple_command(struct command *s,
struct command_continuation *
make_apply(struct command *f, struct command_continuation *c);
struct lsh_object *gaba_apply(struct lsh_object *f,
struct lsh_object *x);
/* The macros are used by automatically generated evaluation code */
extern struct simple_command command_S;
extern struct command_simple command_S;
struct command *make_command_S_2(struct command *f,
struct command *g);
struct command *make_command_S_1(struct command *f);
struct lsh_object *make_apply_S_1(struct lsh_object *f);
struct lsh_object *make_apply_S_2(struct lsh_object *f,
struct lsh_object *gaba_apply_S_1(struct lsh_object *f);
struct lsh_object *gaba_apply_S_2(struct lsh_object *f,
struct lsh_object *g);
#define GABA_VALUE_S (&command_S.super.super)
#define GABA_APPLY_S_1 gaba_apply_S_1
#define GABA_APPLY_S_2 gaba_apply_S_2
extern struct simple_command command_K;
extern struct command_simple command_K;
struct command *make_command_K_1(struct lsh_object *x);
#define GABA_VALUE_K (&command_K.super.super)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment