diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-09-08 20:12:17 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-09-08 20:12:17 -0400 |
commit | 9c09f789905d7b93b5f77084d76428d73bf5631a (patch) | |
tree | b3d8f1b845196b399b4d3b70d2651c5c3dbab173 | |
parent | ea0ad8d321ff7dbd659a5b5bfab8e4b81e8b8d47 (diff) |
Fix memmem() signature; fix mono_reduce environment bookkeeping
-rw-r--r-- | src/c/memmem.c | 2 | ||||
-rw-r--r-- | src/mono_reduce.sml | 5 |
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 |