# HG changeset patch # User Adam Chlipala # Date 1388341130 18000 # Node ID 619191c71abb664af11dab40e5950630a1290d42 # Parent f1485ed65d6c6e7b5f62dd8825a885b3e3db651b Compile-time error for periodic tasks in nonpersistent protocols diff -r f1485ed65d6c -r 619191c71abb src/monoize.sml --- 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