summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/c/memmem.c2
-rw-r--r--src/mono_reduce.sml5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/c/memmem.c b/src/c/memmem.c
index e0687a28..dd457171 100644
--- a/src/c/memmem.c
+++ b/src/c/memmem.c
@@ -56,7 +56,7 @@ __RCSID("$NetBSD$");
* NULL if none is found.
*/
void *
-memmem(const void *b1, const void *b2, size_t len1, size_t len2)
+memmem(const void *b1, size_t len1, const void *b2, size_t len2)
{
/* Initialize search pointer */
char *sp = (char *) b1;
diff --git a/src/mono_reduce.sml b/src/mono_reduce.sml
index 81351e55..58dd2a23 100644
--- a/src/mono_reduce.sml
+++ b/src/mono_reduce.sml
@@ -474,7 +474,7 @@ fun reduce file =
foldl (fn (e, (body, remaining)) =>
(subExpInExp (0, multiLift remaining e) body, remaining - 1))
(body, length subs - 1) subs
- val r = reduceExp env body
+ val r = reduceExp (E.patBinds env p) body
in
(*Print.preface ("subs", Print.p_list (MonoPrint.p_exp env) subs);*)
(*Print.prefaces "ECase"
@@ -510,7 +510,8 @@ fun reduce file =
if impure env e' then
e
else
- EAbs (x', t', ran, reduceExp env (ELet (x, t, liftExpInExp 0 e', swapExpVars 0 e''), loc))
+ EAbs (x', t', ran, reduceExp (E.pushERel env x' t' NONE)
+ (ELet (x, t, liftExpInExp 0 e', swapExpVars 0 e''), loc))
| ELet (x, t, e', b) =>
let