diff options
author | Adam Chlipala <adam@chlipala.net> | 2013-12-29 13:18:50 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2013-12-29 13:18:50 -0500 |
commit | 9be1d757ef2b6fcf1173522671359078ea12a6af (patch) | |
tree | d4e547c6d56c7b5524632d7c6f4a22e35e8bcfc2 | |
parent | 872836350ebef9a155c1cc09d31ffda8851af26a (diff) |
Compile-time error for periodic tasks in nonpersistent protocols
-rw-r--r-- | src/monoize.sml | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/monoize.sml b/src/monoize.sml index b1166734..aeb99d94 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -4442,7 +4442,13 @@ fun monoDecl (env, fm) (all as (d, loc)) = 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 |