# HG changeset patch # User Adam Chlipala # Date 1252455137 14400 # Node ID 7accd4546cf92dc64fdcd3268688fad50243ab4a # Parent cc956020801b62029acd9da3f5132721526ac398 Fix memmem() signature; fix mono_reduce environment bookkeeping diff -r cc956020801b -r 7accd4546cf9 src/c/memmem.c --- a/src/c/memmem.c Tue Sep 08 19:42:12 2009 -0400 +++ b/src/c/memmem.c Tue Sep 08 20:12:17 2009 -0400 @@ -56,7 +56,7 @@ * 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 -r cc956020801b -r 7accd4546cf9 src/mono_reduce.sml --- a/src/mono_reduce.sml Tue Sep 08 19:42:12 2009 -0400 +++ b/src/mono_reduce.sml Tue Sep 08 20:12:17 2009 -0400 @@ -474,7 +474,7 @@ 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 @@ 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