diff 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
line wrap: on
line diff
--- a/src/compiler.sml	Tue Sep 02 10:31:16 2008 -0400
+++ b/src/compiler.sml	Tue Sep 02 10:51:41 2008 -0400
@@ -230,6 +230,7 @@
                                                 val fname = String.implode (List.filter (fn x => not (Char.isSpace x))
                                                                                         (String.explode line))
                                                 val fname = OS.Path.concat (dir, fname)
+                                                            handle OS.Path.Path => fname
                                             in
                                                 fname :: acc
                                             end
@@ -301,8 +302,12 @@
               in
                   let
                       val final = nameOf (List.last fnames)
+
+                      val ds = ds @ [(Source.DExport (Source.StrVar final, ErrorMsg.dummySpan), ErrorMsg.dummySpan)]
                   in
-                      ds @ [(Source.DExport (Source.StrVar final, ErrorMsg.dummySpan), ErrorMsg.dummySpan)]
+                      case database of
+                          NONE => ds
+                        | SOME s => (Source.DDatabase s, ErrorMsg.dummySpan) :: ds
                   end handle Empty => ds
               end,
     print = SourcePrint.p_file