Mercurial > urweb
comparison src/iflow.sml @ 1845:c1e3805e604e
Make Scriptcheck catch more script/message-passing uses, and move the phase earlier in compilation
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 15 Mar 2013 16:09:55 -0400 |
parents | cb0f05bdc183 |
children | 3c93e91e97da |
comparison
equal
deleted
inserted
replaced
1844:2c5e6f78560c | 1845:c1e3805e604e |
---|---|
1793 | ESpawn _ => default () | 1793 | ESpawn _ => default () |
1794 end | 1794 end |
1795 | 1795 |
1796 datatype var_source = Input of int | SubInput of int | Unknown | 1796 datatype var_source = Input of int | SubInput of int | Unknown |
1797 | 1797 |
1798 fun check file = | 1798 fun check (file : file) = |
1799 let | 1799 let |
1800 val () = (St.reset (); | 1800 val () = (St.reset (); |
1801 rfuns := IM.empty) | 1801 rfuns := IM.empty) |
1802 | 1802 |
1803 val file = MonoReduce.reduce file | 1803 val file = MonoReduce.reduce file |
1808 (*val () = Print.preface ("File", MonoPrint.p_file MonoEnv.empty file)*) | 1808 (*val () = Print.preface ("File", MonoPrint.p_file MonoEnv.empty file)*) |
1809 | 1809 |
1810 val exptd = foldl (fn ((d, _), exptd) => | 1810 val exptd = foldl (fn ((d, _), exptd) => |
1811 case d of | 1811 case d of |
1812 DExport (_, _, n, _, _, _) => IS.add (exptd, n) | 1812 DExport (_, _, n, _, _, _) => IS.add (exptd, n) |
1813 | _ => exptd) IS.empty file | 1813 | _ => exptd) IS.empty (#1 file) |
1814 | 1814 |
1815 fun decl (d, loc) = | 1815 fun decl (d, loc) = |
1816 case d of | 1816 case d of |
1817 DTable (tab, fs, pk, _) => | 1817 DTable (tab, fs, pk, _) => |
1818 let | 1818 let |
2069 | _ => ()) | 2069 | _ => ()) |
2070 end | 2070 end |
2071 | 2071 |
2072 | _ => () | 2072 | _ => () |
2073 in | 2073 in |
2074 app decl file | 2074 app decl (#1 file) |
2075 end | 2075 end |
2076 | 2076 |
2077 val check = fn file => | 2077 val check = fn file => |
2078 let | 2078 let |
2079 val oldInline = Settings.getMonoInline () | 2079 val oldInline = Settings.getMonoInline () |