comparison src/compiler.sml @ 271:42dfb0d61cf0

'database' declaration threaded through compiler
author Adam Chlipala <adamc@hcoop.net>
date Tue, 02 Sep 2008 10:51:41 -0400
parents b9b02613c0c2
children 4d80d6122df1
comparison
equal deleted inserted replaced
270:b9b02613c0c2 271:42dfb0d61cf0
228 else 228 else
229 let 229 let
230 val fname = String.implode (List.filter (fn x => not (Char.isSpace x)) 230 val fname = String.implode (List.filter (fn x => not (Char.isSpace x))
231 (String.explode line)) 231 (String.explode line))
232 val fname = OS.Path.concat (dir, fname) 232 val fname = OS.Path.concat (dir, fname)
233 handle OS.Path.Path => fname
233 in 234 in
234 fname :: acc 235 fname :: acc
235 end 236 end
236 in 237 in
237 readSources acc 238 readSources acc
299 300
300 val ds = map parseOne fnames 301 val ds = map parseOne fnames
301 in 302 in
302 let 303 let
303 val final = nameOf (List.last fnames) 304 val final = nameOf (List.last fnames)
305
306 val ds = ds @ [(Source.DExport (Source.StrVar final, ErrorMsg.dummySpan), ErrorMsg.dummySpan)]
304 in 307 in
305 ds @ [(Source.DExport (Source.StrVar final, ErrorMsg.dummySpan), ErrorMsg.dummySpan)] 308 case database of
309 NONE => ds
310 | SOME s => (Source.DDatabase s, ErrorMsg.dummySpan) :: ds
306 end handle Empty => ds 311 end handle Empty => ds
307 end, 312 end,
308 print = SourcePrint.p_file 313 print = SourcePrint.p_file
309 } 314 }
310 315