Mercurial > urweb
comparison src/mono_shake.sml @ 271:42dfb0d61cf0
'database' declaration threaded through compiler
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 02 Sep 2008 10:51:41 -0400 |
parents | 890a61991263 |
children | 09c66a30ef32 |
comparison
equal
deleted
inserted
replaced
270:b9b02613c0c2 | 271:42dfb0d61cf0 |
---|---|
51 (IM.insert (cdef, n, xncs), edef) | 51 (IM.insert (cdef, n, xncs), edef) |
52 | ((DVal (_, n, t, e, _), _), (cdef, edef)) => | 52 | ((DVal (_, n, t, e, _), _), (cdef, edef)) => |
53 (cdef, IM.insert (edef, n, (t, e))) | 53 (cdef, IM.insert (edef, n, (t, e))) |
54 | ((DValRec vis, _), (cdef, edef)) => | 54 | ((DValRec vis, _), (cdef, edef)) => |
55 (cdef, foldl (fn ((_, n, t, e, _), edef) => IM.insert (edef, n, (t, e))) edef vis) | 55 (cdef, foldl (fn ((_, n, t, e, _), edef) => IM.insert (edef, n, (t, e))) edef vis) |
56 | ((DExport _, _), acc) => acc) | 56 | ((DExport _, _), acc) => acc |
57 | ((DDatabase _, _), acc) => acc) | |
57 (IM.empty, IM.empty) file | 58 (IM.empty, IM.empty) file |
58 | 59 |
59 fun typ (c, s) = | 60 fun typ (c, s) = |
60 case c of | 61 case c of |
61 TDatatype (n, _) => | 62 TDatatype (n, _) => |
104 | SOME (t, e) => shakeExp s e) s page_es | 105 | SOME (t, e) => shakeExp s e) s page_es |
105 in | 106 in |
106 List.filter (fn (DDatatype (_, n, _), _) => IS.member (#con s, n) | 107 List.filter (fn (DDatatype (_, n, _), _) => IS.member (#con s, n) |
107 | (DVal (_, n, _, _, _), _) => IS.member (#exp s, n) | 108 | (DVal (_, n, _, _, _), _) => IS.member (#exp s, n) |
108 | (DValRec vis, _) => List.exists (fn (_, n, _, _, _) => IS.member (#exp s, n)) vis | 109 | (DValRec vis, _) => List.exists (fn (_, n, _, _, _) => IS.member (#exp s, n)) vis |
109 | (DExport _, _) => true) file | 110 | (DExport _, _) => true |
111 | (DDatabase _, _) => true) file | |
110 end | 112 end |
111 | 113 |
112 end | 114 end |