[MLton-user] port from sml/nj to mlton

Matthew Fluet matthew.fluet at gmail.com
Sun Jul 31 08:52:22 PDT 2011


On Sun, Jul 31, 2011 at 5:44 AM, Daniii <daruber25 at hotmail.com> wrote:
>
> Hi ,
> i am loading Queue structure in sml/nj using open Queue.
> How i can load it in mlton ?
> Thanks .

You need to add
  $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb
to your program's .mlb file.  See the documentation on the ML Basis
System (http://mlton.org/MLBasis) for more details.

But, in short, you probably need at least two files:

prog.mlb:
local
  $(SML_LIB)/basis/basis.mlb (* import the Basis Library *)
  $(SML_LIB)/smlnj-lib/Util/smlnj-lib.mlb  (* import the SML/NJ
Utility Library *)
in
  prog.sml  (* SML file making use of the Basis Library and the SML/NJ
Utility Library *)
end

prog.sml:
structure L = List  (* List comes from the Basis Library *)
structure Q = Queue  (* Queue comes from the SML/NJ Utility Library *)



More information about the MLton-user mailing list