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 | d6d496a5720290dd26c7c738199667c6c1a67e6a (patch) | |
tree | b3d8f1b845196b399b4d3b70d2651c5c3dbab173 /src | |
parent | 83430cc520eadaffac2ebab258696f9146ada9b0 (diff) |
Fix memmem() signature; fix mono_reduce environment bookkeeping
Diffstat (limited to 'src')
-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 |