Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
1946:f1485ed65d6c | 1947:619191c71abb |
---|---|
4440 val (e1, fm) = monoExp (env, St.empty, fm) e1 | 4440 val (e1, fm) = monoExp (env, St.empty, fm) e1 |
4441 val (e2, fm) = monoExp (env, St.empty, fm) e2 | 4441 val (e2, fm) = monoExp (env, St.empty, fm) e2 |
4442 | 4442 |
4443 val un = (L'.TRecord [], loc) | 4443 val un = (L'.TRecord [], loc) |
4444 val t = if MonoUtil.Exp.exists {typ = fn _ => false, | 4444 val t = if MonoUtil.Exp.exists {typ = fn _ => false, |
4445 exp = fn L'.EFfiApp ("Basis", "periodic", _) => true | 4445 exp = fn L'.EFfiApp ("Basis", "periodic", _) => |
4446 (if #persistent (Settings.currentProtocol ()) then | |
4447 () | |
4448 else | |
4449 E.errorAt (#2 e1) | |
4450 ("Periodic tasks aren't allowed in the selected protocol (" ^ #name (Settings.currentProtocol ()) ^ ")."); | |
4451 true) | |
4446 | _ => false} e1 then | 4452 | _ => false} e1 then |
4447 (L'.TFfi ("Basis", "int"), loc) | 4453 (L'.TFfi ("Basis", "int"), loc) |
4448 else | 4454 else |
4449 un | 4455 un |
4450 | 4456 |