[MLton-commit] r4214

Matthew Fluet MLton@mlton.org
Sat, 12 Nov 2005 13:35:35 -0800


Interleaving lex/parse with elaboration through the use of Promise.t
could result in a Force exception for cyclic MLBs.


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

U   mlton/trunk/mlton/elaborate/elaborate-mlbs.fun

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

Modified: mlton/trunk/mlton/elaborate/elaborate-mlbs.fun
===================================================================
--- mlton/trunk/mlton/elaborate/elaborate-mlbs.fun	2005-11-12 20:54:25 UTC (rev 4213)
+++ mlton/trunk/mlton/elaborate/elaborate-mlbs.fun	2005-11-12 21:35:34 UTC (rev 4214)
@@ -187,6 +187,12 @@
                           (fileAbs, B)
                        end)
                    val B = Promise.force B
+                           handle Promise.Force =>
+                           (* Basis forms a cycle; 
+                            * force the AST to generate error message.
+                            *)
+                           (ignore (Promise.force basdec)
+                            ; #2 (Env.makeBasis (E, fn () => ())))
                 in
                    Env.openBasis (E, B)
                 end