Mercurial > urweb
comparison src/mono_shake.sml @ 144:f0d3402184d1
Simple forms work
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 22 Jul 2008 15:12:20 -0400 |
parents | 18299126a343 |
children | 6847741e1f5f |
comparison
equal
deleted
inserted
replaced
143:4b9c2bd6157c | 144:f0d3402184d1 |
---|---|
42 } | 42 } |
43 | 43 |
44 fun shake file = | 44 fun shake file = |
45 let | 45 let |
46 val page_es = List.foldl | 46 val page_es = List.foldl |
47 (fn ((DExport (_, n, _), _), page_es) => n :: page_es | 47 (fn ((DExport (_, _, n, _), _), page_es) => n :: page_es |
48 | (_, page_es) => page_es) [] file | 48 | (_, page_es) => page_es) [] file |
49 | 49 |
50 val (cdef, edef) = foldl (fn ((DVal (_, n, t, e, _), _), (cdef, edef)) => (cdef, IM.insert (edef, n, (t, e))) | 50 val (cdef, edef) = foldl (fn ((DVal (_, n, t, e, _), _), (cdef, edef)) => (cdef, IM.insert (edef, n, (t, e))) |
51 | ((DValRec vis, _), (cdef, edef)) => | 51 | ((DValRec vis, _), (cdef, edef)) => |
52 (cdef, foldl (fn ((_, n, t, e, _), edef) => IM.insert (edef, n, (t, e))) edef vis) | 52 (cdef, foldl (fn ((_, n, t, e, _), edef) => IM.insert (edef, n, (t, e))) edef vis) |