Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
22f06a61
Commit
22f06a61
authored
Mar 16, 1999
by
Niels Möller
Browse files
Minir bug fixes.
Rev: src/command.c:1.8 Rev: src/command.h:1.10
parent
0404d514
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/command.c
View file @
22f06a61
...
...
@@ -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:
(class
...
...
@@ -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
->
super
.
super
.
call
=
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)) */
...
...
src/command.h
View file @
22f06a61
...
...
@@ -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)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment