[MLton-commit] r4265

Stephen Weeks MLton@mlton.org
Wed, 30 Nov 2005 14:36:59 -0800


Expressed the default basis via a single mlb, default.mlb.

Ordered things in default.mlb to prefer basis type names to MLton type
names.

----------------------------------------------------------------------

A   mlton/trunk/basis-library/default.mlb
U   mlton/trunk/basis-library/libs/basis-2002/top-level/top-level.sml
U   mlton/trunk/mlton/main/compile.fun

----------------------------------------------------------------------

Added: mlton/trunk/basis-library/default.mlb
===================================================================
--- mlton/trunk/basis-library/default.mlb	2005-11-30 20:28:50 UTC (rev 4264)
+++ mlton/trunk/basis-library/default.mlb	2005-11-30 22:36:56 UTC (rev 4265)
@@ -0,0 +1,17 @@
+(* Copyright (C) 2005-2005 Henry Cejtin, Matthew Fluet, Suresh
+ *    Jagannathan, and Stephen Weeks.
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(* Order here matters for choice of type names.  In particular, we want 
+ * basis.mlb to come last so that basis type names are preferred to MLton type
+ * names.
+ *)
+unsafe.mlb
+sml-nj.mlb
+mlton.mlb
+basis.mlb
+
+

Modified: mlton/trunk/basis-library/libs/basis-2002/top-level/top-level.sml
===================================================================
--- mlton/trunk/basis-library/libs/basis-2002/top-level/top-level.sml	2005-11-30 20:28:50 UTC (rev 4264)
+++ mlton/trunk/basis-library/libs/basis-2002/top-level/top-level.sml	2005-11-30 22:36:56 UTC (rev 4265)
@@ -13,6 +13,7 @@
  *
  * Order here matters!  Do not alphabetize or otherwise reorder without thinking.
  *)
+structure Posix = Posix
 structure OS = OS
 structure BoolArray = BoolArray
 structure BoolVector = BoolVector

Modified: mlton/trunk/mlton/main/compile.fun
===================================================================
--- mlton/trunk/mlton/main/compile.fun	2005-11-30 20:28:50 UTC (rev 4264)
+++ mlton/trunk/mlton/main/compile.fun	2005-11-30 22:36:56 UTC (rev 4265)
@@ -654,10 +654,7 @@
 local
    fun genMLB {input: File.t list}: MLBString.t =
       let
-         val basis =
-            String.concat
-            (List.map (["basis", "mlton", "sml-nj", "unsafe"],
-                       fn s => concat ["$(SML_LIB)/basis/", s, ".mlb\n"]))
+         val basis = "$(SML_LIB)/basis/default.mlb"
       in
          MLBString.fromString
          (case input of
@@ -668,7 +665,7 @@
                 in
                    String.concat
                    ["local\n",
-                    basis,
+                    basis, "\n",
                     "in\n",
                     String.concat (List.separate (input, "\n")), "\n",
                     "end\n"]