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 | ca6926d0e0d1af6ea0531c6c558943beb08f646c (patch) | |
tree | d4e547c6d56c7b5524632d7c6f4a22e35e8bcfc2 /src/monoize.sml | |
parent | 44c3bfba2420a555eee8fefe7377d059c4666ef8 (diff) |
Compile-time error for periodic tasks in nonpersistent protocols
Diffstat (limited to 'src/monoize.sml')
-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 |