# HG changeset patch # User Adam Chlipala # Date 1407333002 14400 # Node ID 04d7d563a36f561d1859a138e6ce8c92f0647405 # Parent 459ccbf8cd08e7eb9c4e7ac1d51a7392b1833d2e MonoReduce bug involving 'error' diff -r 459ccbf8cd08 -r 04d7d563a36f src/mono_reduce.sml --- a/src/mono_reduce.sml Fri Aug 01 16:11:36 2014 -0400 +++ b/src/mono_reduce.sml Wed Aug 06 09:50:02 2014 -0400 @@ -685,7 +685,7 @@ map (fn (p, (EAbs (_, _, _, e), _)) => (p, swapExpVarsPat (0, patBinds p) e) | (p, (EError (e, (TFun (_, t), _)), loc)) => - (p, (EError (e, t), loc)) + (p, (EError (liftExpInExp (patBinds p) e, t), loc)) | (p, e) => (p, (EApp (liftExpInExp (patBinds p) e, (ERel (patBinds p), loc)), loc))) diff -r 459ccbf8cd08 -r 04d7d563a36f tests/pb.ur --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/pb.ur Wed Aug 06 09:50:02 2014 -0400 @@ -0,0 +1,7 @@ +fun api_1 (pb:postBody) (nm:string) : transaction page = + return Processing the request + +fun api (pb:postBody) (v:int) (nm:string) : transaction page = + case v of + 1 => api_1 pb nm + | _ => error Version {[v]} is not supported diff -r 459ccbf8cd08 -r 04d7d563a36f tests/pb.urs --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/pb.urs Wed Aug 06 09:50:02 2014 -0400 @@ -0,0 +1,1 @@ +val api : postBody -> int -> string -> transaction page