Mercurial > urweb
diff src/monoize.sml @ 1947:619191c71abb
Compile-time error for periodic tasks in nonpersistent protocols
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 29 Dec 2013 13:18:50 -0500 |
parents | 98895243b5b6 |
children | 0992323fa264 |
line wrap: on
line diff
--- a/src/monoize.sml Sun Dec 29 10:29:26 2013 -0500 +++ b/src/monoize.sml Sun Dec 29 13:18:50 2013 -0500 @@ -4442,7 +4442,13 @@ val un = (L'.TRecord [], loc) val t = if MonoUtil.Exp.exists {typ = fn _ => false, - exp = fn L'.EFfiApp ("Basis", "periodic", _) => true + exp = fn L'.EFfiApp ("Basis", "periodic", _) => + (if #persistent (Settings.currentProtocol ()) then + () + else + E.errorAt (#2 e1) + ("Periodic tasks aren't allowed in the selected protocol (" ^ #name (Settings.currentProtocol ()) ^ ")."); + true) | _ => false} e1 then (L'.TFfi ("Basis", "int"), loc) else