Mercurial > urweb
comparison src/shake.sml @ 144:f0d3402184d1
Simple forms work
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 22 Jul 2008 15:12:20 -0400 |
parents | fd98dd10dce7 |
children | 80192edca30d |
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 ((DCon (_, n, _, c), _), (cdef, edef)) => (IM.insert (cdef, n, c), edef) | 50 val (cdef, edef) = foldl (fn ((DCon (_, n, _, c), _), (cdef, edef)) => (IM.insert (cdef, n, c), edef) |
51 | ((DVal (_, n, t, e, _), _), (cdef, edef)) => (cdef, IM.insert (edef, n, (t, e))) | 51 | ((DVal (_, n, t, e, _), _), (cdef, edef)) => (cdef, IM.insert (edef, n, (t, e))) |
52 | ((DValRec vis, _), (cdef, edef)) => | 52 | ((DValRec vis, _), (cdef, edef)) => |