You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(56) |
Sep
(40) |
Oct
(30) |
Nov
(144) |
Dec
(23) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(41) |
Feb
(29) |
Mar
(31) |
Apr
(39) |
May
(193) |
Jun
(45) |
Jul
(19) |
Aug
(3) |
Sep
(23) |
Oct
(83) |
Nov
(92) |
Dec
(123) |
| 2007 |
Jan
(90) |
Feb
(267) |
Mar
(120) |
Apr
(51) |
May
(40) |
Jun
(121) |
Jul
(109) |
Aug
(173) |
Sep
(77) |
Oct
(52) |
Nov
(121) |
Dec
(62) |
| 2008 |
Jan
(76) |
Feb
(53) |
Mar
(98) |
Apr
(87) |
May
(26) |
Jun
(27) |
Jul
(23) |
Aug
(136) |
Sep
(79) |
Oct
(68) |
Nov
(29) |
Dec
(14) |
| 2009 |
Jan
(7) |
Feb
(2) |
Mar
(11) |
Apr
(75) |
May
(1) |
Jun
(95) |
Jul
(19) |
Aug
(4) |
Sep
(8) |
Oct
(93) |
Nov
(43) |
Dec
(21) |
| 2010 |
Jan
(20) |
Feb
(23) |
Mar
(18) |
Apr
(6) |
May
(20) |
Jun
(23) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
(2) |
Feb
(6) |
Mar
(15) |
Apr
(5) |
May
(9) |
Jun
(14) |
Jul
(9) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
(2) |
Jun
(17) |
Jul
(37) |
Aug
|
Sep
(1) |
Oct
(6) |
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(5) |
Apr
(2) |
May
(7) |
Jun
(11) |
Jul
(8) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(1) |
Jul
(7) |
Aug
(2) |
Sep
|
Oct
(5) |
Nov
(2) |
Dec
(4) |
| 2015 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
|
May
|
Jun
(9) |
Jul
(1) |
Aug
|
Sep
|
Oct
(4) |
Nov
(1) |
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
(1) |
Feb
(3) |
Mar
(3) |
Apr
(7) |
May
(2) |
Jun
(2) |
Jul
(5) |
Aug
(1) |
Sep
(2) |
Oct
(17) |
Nov
(4) |
Dec
(7) |
| 2018 |
Jan
(5) |
Feb
(14) |
Mar
(2) |
Apr
(5) |
May
(2) |
Jun
(5) |
Jul
|
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(5) |
Dec
|
| 2019 |
Jan
(4) |
Feb
(2) |
Mar
(3) |
Apr
(1) |
May
(8) |
Jun
(14) |
Jul
(2) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
(15) |
Dec
(2) |
| 2020 |
Jan
(10) |
Feb
(3) |
Mar
(1) |
Apr
|
May
(9) |
Jun
(4) |
Jul
(16) |
Aug
(10) |
Sep
(4) |
Oct
(3) |
Nov
|
Dec
|
| 2021 |
Jan
(11) |
Feb
(2) |
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(5) |
Sep
|
Oct
(6) |
Nov
(4) |
Dec
(4) |
| 2022 |
Jan
(4) |
Feb
(2) |
Mar
(2) |
Apr
|
May
(6) |
Jun
(3) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(5) |
Jun
(1) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(13) |
Dec
|
| 2024 |
Jan
(1) |
Feb
|
Mar
(5) |
Apr
|
May
(10) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
(14) |
| 2025 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(3) |
Jul
|
Aug
|
Sep
(2) |
Oct
(3) |
Nov
|
Dec
|
|
From: Vesa K. <ve...@ml...> - 2006-11-19 10:21:31
|
Using qualified type name for consistency.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/basic/unstable/public/tie.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/basic/unstable/public/tie.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/tie.sig 2006-11-19 18:19:25 UTC (rev 4837)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/tie.sig 2006-11-19 18:21:27 UTC (rev 4838)
@@ -81,7 +81,7 @@
* 'b}.
*)
- val option : 'a option t
+ val option : 'a Option.t t
(** Tier for options. *)
val function : ('a -> 'b) t
|
|
From: Vesa K. <ve...@ml...> - 2006-11-19 10:19:29
|
Just renamed basis Prod -> Products.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/basic/unstable/basic.mlb
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/basic/unstable/basic.mlb
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/basic.mlb 2006-11-19 18:08:26 UTC (rev 4836)
+++ mltonlib/trunk/com/ssh/basic/unstable/basic.mlb 2006-11-19 18:19:25 UTC (rev 4837)
@@ -67,7 +67,7 @@
in
bas public/ref.sig detail/ref.sml end
end
- basis Prod = let
+ basis Products = let
open BinPr Cmp Effect Fn Order Thunk UnPr
in
bas
@@ -84,27 +84,27 @@
bas public/sum.sig detail/sum.sml end
end
basis Iso = let
- open Fn Prod Sum
+ open Fn Products Sum
in
bas public/iso.sig detail/iso.sml end
end
basis Tie = let
- open Effect Fix Fn Iso Prod Sq Thunk UnOp
+ open Effect Fix Fn Iso Products Sq Thunk UnOp
in
bas public/tie.sig detail/tie.sml end
end
basis Buffer = let
- open Effect Fn Prod Thunk UnOp
+ open Effect Fn Products Thunk UnOp
in
bas public/buffer.sig detail/buffer.sml end
end
basis Reader = let
- open Fn Prod Thunk Univ
+ open Fn Products Thunk Univ
in
bas public/reader.sig detail/reader.sml end
end
basis Writer = let
- open Fn Prod Effect Univ
+ open Fn Products Effect Univ
in
bas public/writer.sig detail/writer.sml end
end
@@ -116,7 +116,7 @@
open Fix Fn
open Iso
open Order
- open Prod
+ open Products
open Reader Ref
open Sq Sum
open Thunk Tie
|
|
From: Vesa K. <ve...@ml...> - 2006-11-19 10:08:29
|
Added Sq.map.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/basic/unstable/detail/sq.sml
U mltonlib/trunk/com/ssh/basic/unstable/public/sq.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/basic/unstable/detail/sq.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/sq.sml 2006-11-19 17:20:55 UTC (rev 4835)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/sq.sml 2006-11-19 18:08:26 UTC (rev 4836)
@@ -7,4 +7,5 @@
structure Sq :> SQ = struct
type 'a t = 'a * 'a
fun mk x = (x, x)
+ fun map f (x, y) = (f x, f y)
end
Modified: mltonlib/trunk/com/ssh/basic/unstable/public/sq.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/sq.sig 2006-11-19 17:20:55 UTC (rev 4835)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/sq.sig 2006-11-19 18:08:26 UTC (rev 4836)
@@ -14,4 +14,7 @@
val mk : 'a -> 'a t
(** {mk x = (x, x)}. *)
+
+ val map : ('a -> 'b) -> 'a t -> 'b t
+ (** {map f (x, y) = (f x, f y)}. *)
end
|
|
From: Vesa K. <ve...@ml...> - 2006-11-19 09:20:57
|
Added some more functions on lists.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/list.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/list.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/list.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/list.sml 2006-11-19 03:02:09 UTC (rev 4834)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/list.sml 2006-11-19 17:20:55 UTC (rev 4835)
@@ -11,4 +11,68 @@
open List
type 'a t = 'a list
val sub = nth
+ fun init l = rev (tl (rev l))
+ fun intersperse d =
+ fn [] => [] | x::xs => x::rev (foldl (fn (x, ys) => x::d::ys) [] xs)
+ local
+ fun cross (f, g) (x, y) = (f x, g y)
+ fun headsAndTails xss =
+ cross (rev, rev)
+ (foldl (fn (h::t, (hs, ts)) => (h::hs, t::ts) | ([], ?) => ?)
+ ([], []) xss)
+ in
+ fun transpose xss =
+ case xss of
+ [] => []
+ | []::xss => transpose xss
+ | (x::xs)::xss => let
+ val (hs, ts) = headsAndTails xss
+ in
+ (x::hs)::transpose (xs::ts)
+ end
+ end
+ fun foldl1 f = fn [] => raise Empty | x::xs => foldl f x xs
+ fun foldr1 f = foldl1 f o rev
+ fun push (r, x) = r := x :: !r
+ fun pop r = case !r of x::xs => (r := xs ; SOME x) | [] => NONE
+ fun split (l, i) = let
+ fun lp (hs, ts, 0) = (rev hs, ts)
+ | lp (_, [], _) = raise Subscript
+ | lp (hs, t::ts, n) = lp (t::hs, ts, n-1)
+ in
+ if i < 0 then raise Subscript else lp ([], l, i)
+ end
+ fun findi p l = let
+ fun lp (_, []) = NONE
+ | lp (i, x::xs) = if p (i, x) then SOME (i, x) else lp (i+1, xs)
+ in
+ lp (0, l)
+ end
+ fun equal eq = let
+ fun lp ([], []) = true
+ | lp (x::xs, y::ys) = eq (x, y) andalso lp (xs, ys)
+ | lp (_, _) = false
+ in
+ lp
+ end
+ fun concatMap f = rev o foldl (fn (x, ys) => revAppend (f x, ys)) []
+ fun appr e = app e o rev
+ fun foldli f y = #2 o foldl (fn (x, (i, y)) => (i+1, f (i+1, x, y))) (~1, y)
+ fun foldri f y xs = let
+ val (n, xs) = foldl (fn (x, (n, xs)) => (n+1, x::xs)) (0, []) xs
+ in
+ #2 (foldl (fn (x, (i, y)) => (i-1, f (i-1, x, y))) (n, y) xs)
+ end
+ fun concatMapi f =
+ rev o foldli (fn (i, x, ys) => revAppend (f (i, x), ys)) []
+ fun mapiPartial f =
+ rev o foldli (fn (i, x, ys) => case f (i, x) of NONE => ys
+ | SOME y => y::ys) []
+ fun mapi f = mapiPartial (SOME o f)
+ fun appi e = foldli (fn (i, x, ()) => e (i, x)) ()
+ fun appri e = foldri (fn (i, x, ()) => e (i, x)) ()
+ fun existsi p = Option.isSome o findi p
+ fun alli p = Option.isNone o findi (not o p)
+ fun index ? = mapi (fn ? => ?) ?
+ fun contains l x = exists (fn y => x = y) l
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/list.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/list.sig 2006-11-19 03:02:09 UTC (rev 4834)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/list.sig 2006-11-19 17:20:55 UTC (rev 4835)
@@ -11,13 +11,81 @@
include LIST
type 'a t = 'a list
- (**
- * Convenience alias.
- *)
+ (** Convenience alias. *)
- val sub : 'a list * int -> 'a
+ (** == Basic == *)
+
+ val sub : 'a t * int -> 'a
(**
* {sub (l, i)} returns the {i}th element of the list {l}. This is
* equivalent to {nth}.
*)
+
+ val init : 'a t -> 'a t
+ (**
+ * Return all the elements of a list except the last one. Raises
+ * {Empty} if the list is empty.
+ *)
+
+ val split : 'a t * int -> 'a t * 'a t
+ (**
+ * {split (l, i)} returns a pair f the first {i} and last {length l -
+ * i} elements of the list {l}. Raises {Subscript} if {i < 0 orelse
+ * length l < i}. Specifically, {split (l, n) = (take (l, n), drop (l,
+ * n))}.
+ *)
+
+ (** == Transformations == *)
+
+ val intersperse : 'a -> 'a t -> 'a t
+ (**
+ * {intersperse d l} forms the list {[sub (l, 0), d, sub (l, 1), d,
+ * ..., d, sub (l, n-1)]} where {n = length l}.
+ *)
+
+ val transpose : 'a t t -> 'a t t
+ (** Transposes the rows and columns of its argument. *)
+
+ val index : 'a t -> (int * 'a) t
+ (**
+ * {index l} returns the list {[(0, sub (l, 0)), (1, sub (l, 1)), ...,
+ * (n-1, sub (l, n-1))]} where {n = length l} is the length of the
+ * given list.
+ *)
+
+ (** == Stack == *)
+
+ val push : 'a t ref * 'a -> unit
+ val pop : 'a t ref -> 'a option
+
+ (** == HOFs == *)
+
+ val foldl1 : ('a * 'a -> 'a) -> 'a t -> 'a
+ val foldr1 : ('a * 'a -> 'a) -> 'a t -> 'a
+
+ val appr : ('a -> unit) -> 'a t -> unit
+ (** {appr f l} applies {f} to the elements of {l}, from right to left. *)
+
+ val concatMap : ('a -> 'b t) -> 'a t -> 'b t
+
+ (** == Indexed HOFs == *)
+
+ val appi : (int * 'a -> unit) -> 'a t -> unit
+ val appri : (int * 'a -> unit) -> 'a t -> unit
+ val concatMapi : (int * 'a -> 'b t) -> 'a t -> 'b t
+ val mapi : (int * 'a -> 'b) -> 'a t -> 'b t
+ val mapiPartial : (int * 'a -> 'b option) -> 'a t -> 'b t
+ val foldli : (int * 'a * 'b -> 'b) -> 'b -> 'a t -> 'b
+ val foldri : (int * 'a * 'b -> 'b) -> 'b -> 'a t -> 'b
+ val alli : (int * 'a -> bool) -> 'a t -> bool
+ val existsi : (int * 'a -> bool) -> 'a t -> bool
+ val findi : (int * 'a -> bool) -> 'a t -> (int * 'a) option
+
+ (** == Set Operations == *)
+
+ val contains : ''a t -> ''a -> bool
+
+ (** == Equality == *)
+
+ val equal : ('a * 'b -> bool) -> 'a t * 'b t -> bool
end
|
|
From: Matthew F. <fl...@ml...> - 2006-11-18 19:02:10
|
Adam Goode's patch for passing distribution policy flags to compilation of runtime ---------------------------------------------------------------------- U mlton/trunk/bytecode/Makefile U mlton/trunk/runtime/Makefile ---------------------------------------------------------------------- Modified: mlton/trunk/bytecode/Makefile =================================================================== --- mlton/trunk/bytecode/Makefile 2006-11-17 22:45:01 UTC (rev 4833) +++ mlton/trunk/bytecode/Makefile 2006-11-19 03:02:09 UTC (rev 4834) @@ -20,8 +20,9 @@ DEBUGFLAGS += -g2 ifeq ($(TARGET_ARCH), amd64) -CFLAGS += -mtune=opteron -m32 -endif +CFLAGS += -m32 +OPTFLAGS += -mtune=opteron +endif ifeq ($(TARGET_OS), darwin) CFLAGS += -I/sw/include @@ -32,13 +33,14 @@ endif interpret.o: interpret.c interpret.h opcode.h - $(CC) $(CFLAGS) -c -O2 interpret.c + $(CC) $(CFLAGS) -c -O2 $(OPTFLAGS) interpret.c interpret-gdb.o: interpret.c interpret.h $(CC) $(DEBUGFLAGS) -c -o $@ -DASSERT=1 interpret.c print-opcodes: print-opcodes.c opcode.h - $(CC) $(CFLAGS) -o print-opcodes -I../runtime -L../runtime \ + $(CC) $(CFLAGS) $(OPTFLAGS) -o print-opcodes \ + -I../runtime -L../runtime \ print-opcodes.c -lmlton .PHONY: clean Modified: mlton/trunk/runtime/Makefile =================================================================== --- mlton/trunk/runtime/Makefile 2006-11-17 22:45:01 UTC (rev 4833) +++ mlton/trunk/runtime/Makefile 2006-11-19 03:02:09 UTC (rev 4834) @@ -13,18 +13,20 @@ TARGET_OS = $(shell ../bin/host-os) GCC_VERSION = $(shell gcc -v 2>&1 | grep 'gcc version' | sed 's/.*gcc version \(.\).*/\1/') -FLAGS = -fomit-frame-pointer +FLAGS = +OPTFLAGS = -fomit-frame-pointer ifeq ($(TARGET_ARCH), x86) ifneq ($(findstring $(GCC_VERSION), 3 4),) -FLAGS += -falign-loops=2 -falign-jumps=2 -falign-functions=5 +OPTFLAGS += -falign-loops=2 -falign-jumps=2 -falign-functions=5 else -FLAGS += -malign-loops=2 -malign-jumps=2 -malign-functions=5 +OPTFLAGS += -malign-loops=2 -malign-jumps=2 -malign-functions=5 endif endif ifeq ($(TARGET_ARCH), amd64) -FLAGS += -mtune=opteron -m32 +FLAGS += -m32 +OPTFLAGS += -mtune=opteron endif ifeq ($(TARGET_ARCH), sparc) @@ -53,7 +55,7 @@ endif CC = gcc -std=gnu99 -CFLAGS = -O2 -Wall -I. -Iplatform -D_FILE_OFFSET_BITS=64 $(FLAGS) +CFLAGS = -O2 -Wall -I. -Iplatform -D_FILE_OFFSET_BITS=64 $(FLAGS) $(OPTFLAGS) DEBUGFLAGS = $(CFLAGS) ifneq ($(TARGET_ARCH), ia64) ifneq ($(TARGET_ARCH), powerpc) |
|
From: Matthew F. <fl...@ml...> - 2006-11-17 14:45:02
|
Ignore mlyacc/mlyacc.pdf ---------------------------------------------------------------------- _U mlton/trunk/mlyacc/ U mlton/trunk/mlyacc/.ignore ---------------------------------------------------------------------- Property changes on: mlton/trunk/mlyacc ___________________________________________________________________ Name: svn:ignore - *.call-graph.dot *.ssa mlyacc.ps mlyacc.sml mlyacc + *.call-graph.dot *.ssa mlyacc.pdf mlyacc.ps mlyacc.sml mlyacc Modified: mlton/trunk/mlyacc/.ignore =================================================================== --- mlton/trunk/mlyacc/.ignore 2006-11-17 22:39:06 UTC (rev 4832) +++ mlton/trunk/mlyacc/.ignore 2006-11-17 22:45:01 UTC (rev 4833) @@ -1,5 +1,6 @@ *.call-graph.dot *.ssa +mlyacc.pdf mlyacc.ps mlyacc.sml mlyacc |
|
From: Matthew F. <fl...@ml...> - 2006-11-17 14:39:09
|
Add /sw/include to include path for runtime on Darwin
----------------------------------------------------------------------
U mlton/trunk/bin/mlton-script
U mlton/trunk/bytecode/Makefile
U mlton/trunk/runtime/Makefile
----------------------------------------------------------------------
Modified: mlton/trunk/bin/mlton-script
===================================================================
--- mlton/trunk/bin/mlton-script 2006-11-17 20:12:33 UTC (rev 4831)
+++ mlton/trunk/bin/mlton-script 2006-11-17 22:39:06 UTC (rev 4832)
@@ -67,10 +67,6 @@
# You may need to add a line with -link-opt '-L/path/to/libgmp' so
# that the linker can find libgmp.
-if [ -d '/sw/lib' ]; then
- darwinLinkOpts='-L/sw/lib'
-fi
-
doit "$lib" \
-cc "$gcc" \
-cc-opt "-I$lib/include" \
@@ -99,7 +95,7 @@
-target-link-opt aix '-lgmp' \
-target-link-opt amd64 '-m32' \
-target-link-opt cygwin '-lgmp' \
- -target-link-opt darwin "$darwinLinkOpts -lgmp" \
+ -target-link-opt darwin "-L/sw/lib -lgmp" \
-target-link-opt freebsd '-L/usr/local/lib/ -lgmp' \
-target-link-opt hpux '-lgmp' \
-target-link-opt linux '-lgmp' \
Modified: mlton/trunk/bytecode/Makefile
===================================================================
--- mlton/trunk/bytecode/Makefile 2006-11-17 20:12:33 UTC (rev 4831)
+++ mlton/trunk/bytecode/Makefile 2006-11-17 22:39:06 UTC (rev 4832)
@@ -23,6 +23,10 @@
CFLAGS += -mtune=opteron -m32
endif
+ifeq ($(TARGET_OS), darwin)
+CFLAGS += -I/sw/include
+endif
+
ifeq ($(TARGET_OS), freebsd)
CFLAGS += -I/usr/local/include
endif
Modified: mlton/trunk/runtime/Makefile
===================================================================
--- mlton/trunk/runtime/Makefile 2006-11-17 20:12:33 UTC (rev 4831)
+++ mlton/trunk/runtime/Makefile 2006-11-17 22:39:06 UTC (rev 4832)
@@ -31,6 +31,10 @@
FLAGS += -mcpu=v8 -m32
endif
+ifeq ($(TARGET_OS), darwin)
+FLAGS += -I/sw/include
+endif
+
ifeq ($(TARGET_OS), freebsd)
FLAGS += -I/usr/local/include
endif
|
|
From: Vesa K. <ve...@ml...> - 2006-11-17 12:12:36
|
Oops... Some files were intentionally missing from a previous commit.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/basic/unstable/detail/smlnj/pre-emb-iso.cm
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/basic/unstable/detail/smlnj/pre-emb-iso.cm
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/smlnj/pre-emb-iso.cm 2006-11-17 20:09:52 UTC (rev 4830)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/smlnj/pre-emb-iso.cm 2006-11-17 20:12:33 UTC (rev 4831)
@@ -18,10 +18,8 @@
../../public/pair.sig
../../public/product-type.sig
../../public/product.sig
- ../../public/random-gen.sig
../../public/reader.sig
../../public/ref.sig
- ../../public/rng.sig
../../public/sq.sig
../../public/sum.sig
../../public/thunk.sig
@@ -38,7 +36,6 @@
../exit.sml
../fix.sml
../fn.sml
- ../mk-random-gen.fun
../order.sml
../pair.sml
../product.sml
|
|
From: Vesa K. <ve...@ml...> - 2006-11-17 12:09:53
|
Oops... Some files were unintentionally missing from a previous commit. ---------------------------------------------------------------------- A mltonlib/trunk/com/ssh/basic/unstable/public/infixes.sml A mltonlib/trunk/com/ssh/basic/unstable/public/top-level.sml ---------------------------------------------------------------------- Added: mltonlib/trunk/com/ssh/basic/unstable/public/infixes.sml =================================================================== --- mltonlib/trunk/com/ssh/basic/unstable/public/infixes.sml 2006-11-17 12:38:45 UTC (rev 4829) +++ mltonlib/trunk/com/ssh/basic/unstable/public/infixes.sml 2006-11-17 20:09:52 UTC (rev 4830) @@ -0,0 +1,76 @@ +(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland + * + * MLton is released under a BSD-style license. + * See the file MLton-LICENSE for details. + *) + +(** + * == Operator Precedence Table == + * + * The precendences of most Basis Library operators are modified here to + * accommodate the sectioning, application, and piping operators: + * + * * / div mod are +1 from Basis Library + * + - ^ are +1 from Basis Library + * :: @ are +1 from Basis Library + * = <> > >= < <= are +1 from Basis Library + * := is -2 from Basis Library + * + * The changed precedences should not cause (major) problems as the + * relative precedences of only a couple of operators are changed. If you + * do encounter problems, it would nice to hear about them. + * + * See + * + * http://mlton.org/InfixingOperators + * + * for a discussion of fixity declarations in SML. + * + * While one should think twice before introducing new infix declarations + * at the top-level, a carefully chosen set of top-level infix + * declarations can make programs much more aesthetically pleasing and + * readable. + * + * Categories used below: + * + * Basis Operators from the Standard ML Basis Library + * B & P Bitwise and Predicate operators + * P & S Piping and Sectioning operators + * Monadic Monadic operators + * Ticked Ticked operators + * Misc Uncategorized + *) + +(* ************************************************************************** *) +(* ! Basis ! B & P ! P & S ! Monadic ! Ticked ! Misc *) +(* ========================================================================== *) +infix 8 ! * div ! << >> ! ! ! *` ! + ! / mod ! ~>> ! ! ! /` ! +(* ========================================================================== *) +infix 7 ! + - ^ ! andb ! ! ! +` -` ! + ! ! ! ! ! ^` ! +(* ========================================================================== *) +infixr 6 ! :: @ ! xorb ! ! ! ::` @` ! +(* ========================================================================== *) +infix 5 ! > >= = ! orb == ! ! ! =` ! + ! < <= <> ! != ?= ! ! ! ! +(* ========================================================================== *) +infix 4 ! ! ! <\ \> ! ! ! +(* -------------------------------------------------------------------------- *) +infixr 4 ! ! ! </ /> ! ! ! +(* ========================================================================== *) +infix 3 ! o ! ! ! ! ! <--> +(* ========================================================================== *) +infix 2 ! ! andAlso ! >| ! ! ! +(* -------------------------------------------------------------------------- *) +infixr 2 ! ! ! |< ! ! ! +(* ========================================================================== *) +infix 1 ! := ! orElse ! ! >>= >> ! ! :=: += -= + ! ! ! ! >>& ! ! +(* ========================================================================== *) +infix 0 ! before ! ! ! ! &` ! & +(* -------------------------------------------------------------------------- *) +infixr 0 ! ! ! ! ! ! --> +(* ************************************************************************** *) + +nonfix ! (* We just used ! above as a visual separator. *) Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/infixes.sml ___________________________________________________________________ Name: svn:eol-style + native Added: mltonlib/trunk/com/ssh/basic/unstable/public/top-level.sml =================================================================== --- mltonlib/trunk/com/ssh/basic/unstable/public/top-level.sml 2006-11-17 12:38:45 UTC (rev 4829) +++ mltonlib/trunk/com/ssh/basic/unstable/public/top-level.sml 2006-11-17 20:09:52 UTC (rev 4830) @@ -0,0 +1,8 @@ +(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland + * + * MLton is released under a BSD-style license. + * See the file MLton-LICENSE for details. + *) + +datatype product = datatype Product.product +datatype sum = datatype Sum.sum Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/top-level.sml ___________________________________________________________________ Name: svn:eol-style + native |
|
From: Vesa K. <ve...@ml...> - 2006-11-17 04:39:10
|
Commit of some basic utilities (still more to come).
----------------------------------------------------------------------
A mltonlib/trunk/com/ssh/basic/unstable/basic.cm
U mltonlib/trunk/com/ssh/basic/unstable/basic.mlb
A mltonlib/trunk/com/ssh/basic/unstable/detail/bin-op.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/bin-pr.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/buffer.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/cmp.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/effect.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/fix.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/fn.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/iso.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/order.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/pair.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/product.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/reader.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/ref.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/smlnj/
A mltonlib/trunk/com/ssh/basic/unstable/detail/smlnj/pre-emb-iso.cm
A mltonlib/trunk/com/ssh/basic/unstable/detail/smlnj/unsealed.cm
A mltonlib/trunk/com/ssh/basic/unstable/detail/sq.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/sum.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/thunk.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/tie.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/un-op.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/un-pr.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/univ.sml
A mltonlib/trunk/com/ssh/basic/unstable/detail/writer.sml
A mltonlib/trunk/com/ssh/basic/unstable/public/bin-op.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/bin-pr.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/buffer.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/cmp.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/effect.sig
U mltonlib/trunk/com/ssh/basic/unstable/public/export.sml
A mltonlib/trunk/com/ssh/basic/unstable/public/fix.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/fn.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/iso.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/order.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/pair.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/product-type.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/product.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/reader.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/ref.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/sq.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/sum.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/thunk.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/tie.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/un-op.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/un-pr.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/univ.sig
A mltonlib/trunk/com/ssh/basic/unstable/public/writer.sig
----------------------------------------------------------------------
Added: mltonlib/trunk/com/ssh/basic/unstable/basic.cm
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/basic.cm 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/basic.cm 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,11 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+library
+ source(public/export.sml)
+is
+ detail/smlnj/unsealed.cm
+ public/export.sml
Modified: mltonlib/trunk/com/ssh/basic/unstable/basic.mlb
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/basic.mlb 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/basic.mlb 2006-11-17 12:38:45 UTC (rev 4829)
@@ -13,10 +13,119 @@
"warnUnused true"
in
local
- public/exit.sig
- detail/exit.sml
+ (* The following is basically an experiment in having explicit
+ * dependencies. Each basis defined below is self contained.
+ * Interface and implementation dependencies aren't separated.
+ *)
+
+ basis Fn = bas public/fn.sig detail/fn.sml end
+ basis Sq = bas public/sq.sig detail/sq.sml end
+ basis UnOp = bas public/un-op.sig detail/un-op.sml end
+ basis Thunk = let
+ open Fn
+ in
+ bas public/thunk.sig detail/thunk.sml end
+ end
+ basis Univ = let
+ open Thunk
+ in
+ bas public/univ.sig detail/univ.sml end
+ end
+ basis BinOp = let
+ open Sq
+ in
+ bas public/bin-op.sig detail/bin-op.sml end
+ end
+ basis Effect = let
+ open UnOp
+ in
+ bas public/effect.sig detail/effect.sml end
+ end
+ basis Fix = let open UnOp in bas public/fix.sig detail/fix.sml end end
+ basis UnPr = let
+ open BinOp UnOp
+ in
+ bas public/un-pr.sig detail/un-pr.sml end
+ end
+ basis Order = let
+ open Thunk UnOp UnPr
+ in
+ bas public/order.sig detail/order.sml end
+ end
+ basis BinPr = let
+ open Sq UnPr
+ in
+ bas public/bin-pr.sig detail/bin-pr.sml end
+ end
+ basis Cmp = let
+ open BinPr Order Sq
+ in
+ bas public/cmp.sig detail/cmp.sml end
+ end
+ basis Ref = let
+ open BinPr Effect Sq UnOp
+ in
+ bas public/ref.sig detail/ref.sml end
+ end
+ basis Prod = let
+ open BinPr Cmp Effect Fn Order Thunk UnPr
+ in
+ bas
+ public/product-type.sig
+ public/pair.sig
+ detail/pair.sml
+ public/product.sig
+ detail/product.sml
+ end
+ end
+ basis Sum = let
+ open BinPr Cmp Effect UnOp UnPr
+ in
+ bas public/sum.sig detail/sum.sml end
+ end
+ basis Iso = let
+ open Fn Prod Sum
+ in
+ bas public/iso.sig detail/iso.sml end
+ end
+ basis Tie = let
+ open Effect Fix Fn Iso Prod Sq Thunk UnOp
+ in
+ bas public/tie.sig detail/tie.sml end
+ end
+ basis Buffer = let
+ open Effect Fn Prod Thunk UnOp
+ in
+ bas public/buffer.sig detail/buffer.sml end
+ end
+ basis Reader = let
+ open Fn Prod Thunk Univ
+ in
+ bas public/reader.sig detail/reader.sml end
+ end
+ basis Writer = let
+ open Fn Prod Effect Univ
+ in
+ bas public/writer.sig detail/writer.sml end
+ end
+ basis Exit = bas public/exit.sig detail/exit.sml end
+
+ open BinOp BinPr Buffer
+ open Cmp
+ open Effect Exit
+ open Fix Fn
+ open Iso
+ open Order
+ open Prod
+ open Reader Ref
+ open Sq Sum
+ open Thunk Tie
+ open Univ UnOp UnPr
+ open Writer
in
public/export.sml
+ public/top-level.sml
+ public/infixes.sml
end
end
end
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/bin-op.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/bin-op.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/bin-op.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,9 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure BinOp :> BIN_OP = struct
+ type 'a t = 'a Sq.t -> 'a
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/bin-op.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/bin-pr.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/bin-pr.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/bin-pr.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,9 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure BinPr :> BIN_PR = struct
+ type 'a t = 'a Sq.t UnPr.t
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/bin-pr.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/buffer.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/buffer.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/buffer.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,54 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Buffer :> BUFFER = struct
+ structure A = Array and AS = ArraySlice and V = Vector and VS = VectorSlice
+ datatype 'a t = IN of {length : int ref, data : 'a A.t ref}
+ fun new () = IN {length = ref 0, data = ref (A.fromList [])}
+ fun duplicate (IN {length, data}) =
+ IN {length = ref (!length), data = ref (A.duplicate (!data))}
+ fun length (IN {length, ...}) = !length
+ fun data (IN {data, ...}) = !data
+ fun sub (b, i) = if length b <= i then raise Subscript else A.sub (data b, i)
+ local
+ fun cap b = A.length (data b)
+ fun decideCap c r = if r <= c then c else decideCap (2*c+1) r
+ in
+ fun ensureCap (b as IN {data, ...}) reqCap filler =
+ if reqCap <= cap b then ()
+ else let val oldData = !data
+ in data := A.tabulate (decideCap (cap b) reqCap,
+ fn i => if A.length oldData <= i then
+ filler
+ else
+ A.sub (oldData, i))
+ end
+ end
+ local
+ fun mk sLength sSub sCopy (b as IN {length, data}, s) =
+ case sLength s of
+ 0 => ()
+ | n => let
+ val newLength = !length + n
+ in ensureCap b newLength (sSub (s, 0))
+ ; sCopy {src = s, dst = !data, di = !length} : unit
+ ; length := newLength
+ end
+ in
+ fun push ? = mk (Fn.const 1) Pair.fst
+ (fn {src, dst, di} => A.update (dst, di, src)) ?
+ fun pushArray ? = mk A.length A.sub A.copy ?
+ fun pushArraySlice ? = mk AS.length AS.sub AS.copy ?
+ fun pushVector ? = mk V.length V.sub A.copyVec ?
+ fun pushVectorSlice ? = mk VS.length VS.sub AS.copyVec ?
+ end
+ local
+ fun mk tabulate b = tabulate (length b, fn i => sub (b, i))
+ in
+ fun toArray ? = mk A.tabulate ?
+ fun toVector ? = mk V.tabulate ?
+ end
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/buffer.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/cmp.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/cmp.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/cmp.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,17 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Cmp :> CMP = struct
+ type 'a t = 'a Sq.t -> Order.t
+
+ fun mkRelOps cmp = let
+ open Order
+ in
+ {< = isLess o cmp, <= = not o isGreater o cmp,
+ == = isEqual o cmp, != = not o isEqual o cmp,
+ > = isGreater o cmp, >= = not o isLess o cmp}
+ end
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/cmp.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/effect.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/effect.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/effect.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,13 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Effect :> EFFECT = struct
+ type 'a t = 'a -> unit
+ val ignore = ignore
+ val nop = ignore
+ fun obs ef x = (ef x : unit ; x)
+ fun past ef x = (ef () : unit ; x)
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/effect.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/fix.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/fix.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/fix.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,10 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Fix :> FIX = struct
+ type 'a t = 'a UnOp.t -> 'a
+ exception Fix
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/fix.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/fn.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/fn.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/fn.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,24 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Fn :> FN = struct
+ type ('a, 'b) t = 'a -> 'b
+ fun map (f, g) h = g o h o f
+ fun const x _ = x
+ fun curry f x y = f (x, y)
+ fun failing e _ = raise e
+ fun flip f x y = f y x
+ fun id x = x
+ fun uncurry f (x, y) = f x y
+ val op o = op o
+ fun undefined _ = raise Fail "undefined"
+ fun op <\ (x, f) y = f (x, y)
+ fun op \> (f, y) = f y
+ fun op /> (f, y) x = f (x, y)
+ fun op </ (x, f) = f x
+ val op >| = op </
+ val op |< = op \>
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/fn.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/iso.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/iso.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/iso.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,25 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Iso : ISO = struct
+ open Iso
+
+ infix <-->
+
+ val swap = Pair.swap
+
+ fun (a2b, b2a) <--> (c2a, a2c) = (a2b o c2a, a2c o b2a)
+
+ fun map (l, r) iso = r <--> iso <--> l
+
+ local
+ fun mk map = Pair.map map o Pair.swizzle
+ in
+ fun op --> ? = mk (Fn.map, Fn.map) ?
+ fun op +` ? = mk (Sum.map, Sum.map) ?
+ fun op *` ? = mk (Product.map, Product.map) ?
+ end
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/iso.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/order.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/order.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/order.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,17 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Order :> ORDER = struct
+ datatype t = datatype order
+ val swap = fn LESS => GREATER
+ | EQUAL => EQUAL
+ | GREATER => LESS
+ fun isEqual x = x = EQUAL
+ fun isGreater x = x = GREATER
+ fun isLess x = x = LESS
+ val orWhenEq = fn (EQUAL, th) => th ()
+ | (other, _) => other
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/order.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/pair.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/pair.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/pair.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,52 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Pair : PAIR = struct
+ type ('a, 'b) pair = 'a * 'b
+ type ('a, 'b) t = ('a, 'b) pair
+
+ val isoTuple2 as (fromTuple2, toTuple2) =
+ (fn (a, b) => (a, b),
+ fn (a, b) => (a, b))
+ val isoTuple3 as (fromTuple3, toTuple3) =
+ (fn (a, b, c) => ((a, b), c),
+ fn ((a, b), c) => (a, b, c))
+ val isoTuple4 as (fromTuple4, toTuple4) =
+ (fn (a, b, c, d) => (((a, b), c), d),
+ fn (((a, b), c), d) => (a, b, c, d))
+
+ fun swap (a, b) = (b, a)
+ fun swizzle ((a, b), (c, d)) = ((a, c), (b, d))
+
+ fun fst (a, _) = a
+ fun snd (_, b) = b
+
+ fun app (ea, eb) (a, b) = (ea a : unit ; eb b : unit)
+ fun appFst eA = app (eA, Effect.ignore)
+ fun appSnd eB = app (Effect.ignore, eB)
+
+ fun map (fa, fb) (a, b) = (fa a, fb b)
+ fun mapFst fA = map (fA, Fn.id)
+ fun mapSnd fB = map (Fn.id, fB)
+
+ local
+ fun mk p (fA, fB) (a, b) = let
+ val a = fA a
+ in
+ if p a then a else fB b
+ end
+ in
+ fun all ? = mk Bool.isFalse ?
+ fun exists ? = mk Bool.isTrue ?
+ fun equal ? = mk Bool.isFalse ? o swizzle
+ fun collate ? = mk Order.isEqual ? o swizzle
+ end
+
+ fun foldl (fa, fb) ((a, b), s) = fb (b, fa (a, s))
+ fun foldr (fa, fb) ((a, b), s) = fa (a, fb (b, s))
+
+ fun thunk (na, nb) () = (na (), nb ())
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/pair.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/product.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/product.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/product.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,54 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Product : PRODUCT = struct
+ datatype ('a, 'b) product = & of 'a * 'b
+ type ('a, 'b) t = ('a, 'b) product
+
+ infix &
+
+ val isoTuple2 as (fromTuple2, toTuple2) =
+ (fn (a, b) => a & b,
+ fn a & b => (a, b))
+ val isoTuple3 as (fromTuple3, toTuple3) =
+ (fn (a, b, c) => a & b & c,
+ fn a & b & c => (a, b, c))
+ val isoTuple4 as (fromTuple4, toTuple4) =
+ (fn (a, b, c, d) => a & b & c & d,
+ fn a & b & c & d => (a, b, c, d))
+
+ fun swap (a & b) = b & a
+ fun swizzle ((a & b), (c & d)) = ((a, c) & (b, d))
+
+ fun fst (a & _) = a
+ fun snd (_ & b) = b
+
+ fun app (eA, eB) (a & b) = (eA a : unit ; eB b : unit)
+ fun appFst eA = app (eA, Effect.ignore)
+ fun appSnd eB = app (Effect.ignore, eB)
+
+ fun map (fA, fB) (a & b) = fA a & fB b
+ fun mapFst fA = map (fA, Fn.id)
+ fun mapSnd fB = map (Fn.id, fB)
+
+ local
+ fun mk p (fA, fB) (a & b) = let
+ val a = fA a
+ in
+ if p a then a else fB b
+ end
+ in
+ fun all ? = mk Bool.isFalse ?
+ fun exists ? = mk Bool.isTrue ?
+ fun equal ? = mk Bool.isFalse ? o swizzle
+ fun collate ? = mk Order.isEqual ? o swizzle
+ end
+
+ fun foldl (fA, fB) (a & b, s) = fB (b, fA (a, s))
+ fun foldr (fA, fB) (a & b, s) = fA (a, fB (b, s))
+
+ fun thunk (nA, nB) () = nA () & nB ()
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/product.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/reader.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/reader.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/reader.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,27 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Reader :> READER = struct
+ type ('a, 'b) t = 'b -> ('a * 'b) Option.t
+
+ infix >>= >>&
+
+ fun return a s = SOME (a, s)
+ fun rA >>= a2rB = Option.mapPartial (Fn.uncurry a2rB) o rA
+
+ fun map a2b rA = rA >>= return o a2b
+ fun rA >>& rB = rA >>= (fn a => rB >>= (fn b => return (Product.& (a, b))))
+
+ type univ = Univ.t
+ type 'a u = ('a, univ) t
+
+ fun polymorphically uA2uB = let
+ val (to, from) = Univ.newIso ()
+ fun map f = Option.map (Pair.map (Fn.id, f))
+ in
+ Fn.map (to, map from) o uA2uB o Fn.map (from, map to)
+ end
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/reader.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/ref.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/ref.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/ref.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,24 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Ref : REF = struct
+ type 'a t = 'a ref
+ val new = ref
+ val ! = !
+ val op := = op :=
+ fun op :=: (r1, r2) = let
+ val v1 = !r1
+ val v2 = !r2
+ in
+ r1 := v2
+ ; r2 := v1
+ end
+ fun exchange (r, v) = !r before r := v
+ fun app ef = ef o !
+ fun map f = new o f o !
+ fun modify f r = r := f (!r)
+ val equal = op =
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/ref.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/smlnj/pre-emb-iso.cm
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/smlnj/pre-emb-iso.cm 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/smlnj/pre-emb-iso.cm 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,54 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+group is
+ ../../../../extended-basis/unstable/basis.cm
+ ../../public/bin-op.sig
+ ../../public/bin-pr.sig
+ ../../public/buffer.sig
+ ../../public/cmp.sig
+ ../../public/effect.sig
+ ../../public/exit.sig
+ ../../public/fix.sig
+ ../../public/fn.sig
+ ../../public/order.sig
+ ../../public/pair.sig
+ ../../public/product-type.sig
+ ../../public/product.sig
+ ../../public/random-gen.sig
+ ../../public/reader.sig
+ ../../public/ref.sig
+ ../../public/rng.sig
+ ../../public/sq.sig
+ ../../public/sum.sig
+ ../../public/thunk.sig
+ ../../public/tie.sig
+ ../../public/un-op.sig
+ ../../public/un-pr.sig
+ ../../public/univ.sig
+ ../../public/writer.sig
+ ../bin-op.sml
+ ../bin-pr.sml
+ ../buffer.sml
+ ../cmp.sml
+ ../effect.sml
+ ../exit.sml
+ ../fix.sml
+ ../fn.sml
+ ../mk-random-gen.fun
+ ../order.sml
+ ../pair.sml
+ ../product.sml
+ ../reader.sml
+ ../ref.sml
+ ../sq.sml
+ ../sum.sml
+ ../thunk.sml
+ ../tie.sml
+ ../un-op.sml
+ ../un-pr.sml
+ ../univ.sml
+ ../writer.sml
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/smlnj/unsealed.cm
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/smlnj/unsealed.cm 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/smlnj/unsealed.cm 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,11 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+group is
+ ../../../../extended-basis/unstable/basis.cm
+ ../../public/iso.sig
+ ../iso.sml
+ pre-emb-iso.cm
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/sq.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/sq.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/sq.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,10 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Sq :> SQ = struct
+ type 'a t = 'a * 'a
+ fun mk x = (x, x)
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/sq.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/sum.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/sum.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/sum.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,43 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Sum : SUM = struct
+ datatype ('a, 'b) sum = INL of 'a | INR of 'b
+ type('a, 'b) t = ('a, 'b) sum
+
+ exception Sum
+
+ fun sum (fA, fB) = fn INL a => fA a | INR b => fB b
+
+ val swap = fn INL x => INR x | INR x => INL x
+
+ val out = fn INL x => x | INR x => x
+
+ val app = sum
+ fun map (fA, fB) = sum (INL o fA, INR o fB)
+
+ val isL = fn INL _ => true | INR _ => false
+ val outL = fn INL l => l | INR _ => raise Sum
+ val getL = fn INL x => (fn _ => x) | INR _ => (fn x => x)
+ fun mapL f = map (f, fn r => r)
+
+ fun isR ? = (isL o swap) ?
+ fun outR ? = (outL o swap) ?
+ fun getR ? = (getL o swap) ?
+ fun mapR f = swap o mapL f o swap
+
+ fun equal (eqA, eqB) =
+ fn (INL l, INL r) => eqA (l, r)
+ | (INL _, INR _) => false
+ | (INR _, INL _) => false
+ | (INR l, INR r) => eqB (l, r)
+
+ fun collate (cmpA, cmpB) =
+ fn (INL l, INL r) => cmpA (l, r)
+ | (INL _, INR _) => LESS
+ | (INR _, INL _) => GREATER
+ | (INR l, INR r) => cmpB (l, r)
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/sum.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/thunk.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/thunk.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/thunk.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,10 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Thunk :> THUNK = struct
+ type 'a t = unit -> 'a
+ val mk = Fn.const
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/thunk.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/tie.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/tie.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/tie.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,23 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Tie :> TIE = struct
+ type 'a t_domain = unit
+ type 'a t_range = 'a * 'a UnOp.t
+ type 'a t = 'a t_domain -> 'a t_range
+ fun fix a f = let val (a, ta) = a () in ta (f a) end
+ val pure = Fn.id
+ fun tier th = (fn (a, ta) => (a, Fn.const a o ta)) o th
+ fun iso tb iso = Pair.map (Iso.from iso, Fn.map iso) o tb
+ fun op *` (a, b) = Pair.map (Product.&, Product.map) o
+ Pair.swizzle o Pair.map (a, b) o Sq.mk
+ fun tuple2 (a, b) = iso (op *` (a, b)) Product.isoTuple2
+ fun option () = (NONE, Fn.id)
+ fun fromRef rf x = !rf x
+ fun function ? =
+ tier (fn () => Pair.map (fromRef, Fn.curry op :=)
+ (Sq.mk (ref (Fn.failing Fix.Fix)))) ?
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/tie.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/un-op.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/un-op.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/un-op.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,9 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure UnOp :> UN_OP = struct
+ type 'a t = 'a -> 'a
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/un-op.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/un-pr.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/un-pr.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/un-pr.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,12 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure UnPr :> UN_PR = struct
+ type 'a t = 'a -> bool
+ fun op andAlso (p, q) ? = p ? andalso q ?
+ fun op orElse (p, q) ? = p ? orelse q ?
+ fun negate p = not o p
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/un-pr.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/univ.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/univ.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/univ.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,21 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Univ :> UNIV = struct
+ type t = exn
+
+ fun newIso () = let
+ exception U of 'a
+ in
+ (U, fn U ? => ? | _ => raise Match)
+ end
+
+ fun newEmb () = let
+ exception U of 'a
+ in
+ (U, fn U ? => SOME ? | _ => NONE)
+ end
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/univ.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/detail/writer.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/detail/writer.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/detail/writer.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,21 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+structure Writer :> WRITER = struct
+ type ('a, 'b) t = 'a * 'b -> 'b
+
+ fun map b2a wA = wA o Pair.map (b2a, Fn.id)
+
+ type univ = Univ.t
+ type 'a u = ('a, univ) t
+
+ fun polymorphically uA2uB = let
+ val (to, from) = Univ.newIso ()
+ fun map f = Pair.map (Fn.id, f)
+ in
+ Fn.map (map to, from) o uA2uB o Fn.map (map from, to)
+ end
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/detail/writer.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/bin-op.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/bin-op.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/bin-op.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,11 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** Utilities for dealing with binary operators. *)
+signature BIN_OP = sig
+ type 'a t = 'a Sq.t -> 'a
+ (** Type of binary operators (e.g. {+, -, @, ...}). *)
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/bin-op.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/bin-pr.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/bin-pr.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/bin-pr.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,11 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** Utilities for dealing with binary predicates. *)
+signature BIN_PR = sig
+ type 'a t = 'a Sq.t UnPr.t
+ (** Type of binary predicates or relations (e.g. {<, <=, >=, >, ...}). *)
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/bin-pr.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/buffer.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/buffer.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/buffer.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,28 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** Imperative dynamically growing buffer. *)
+signature BUFFER = sig
+ type 'a t
+
+ val new : 'a t Thunk.t
+
+ val duplicate : 'a t UnOp.t
+
+ val length : 'a t -> Int.t
+
+ val sub : 'a t * Int.t -> 'a
+
+ val push : ('a t * 'a) Effect.t
+
+ val pushArray : ('a t * 'a Array.t) Effect.t
+ val pushArraySlice : ('a t * 'a ArraySlice.t) Effect.t
+ val pushVector : ('a t * 'a Vector.t) Effect.t
+ val pushVectorSlice : ('a t * 'a VectorSlice.t) Effect.t
+
+ val toArray : 'a t -> 'a Array.t
+ val toVector : 'a t -> 'a Vector.t
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/buffer.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/cmp.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/cmp.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/cmp.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,16 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** Utilities for dealing with compare functions. *)
+signature CMP = sig
+ type 'a t = 'a Sq.t -> Order.t
+ (** Type of compare functions (e.g. {Int.compare, String.compare, ...}). *)
+
+ val mkRelOps : 'a t -> {< : 'a BinPr.t, <= : 'a BinPr.t,
+ > : 'a BinPr.t, >= : 'a BinPr.t,
+ == : 'a BinPr.t, != : 'a BinPr.t}
+ (** Returns a record of relational operators given a compare function. *)
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/cmp.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/effect.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/effect.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/effect.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,32 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** Utilities for dealing with side-effecting procedures. *)
+signature EFFECT = sig
+ type 'a t = 'a -> unit
+ (** Type of side-effecting procedures. *)
+
+ val ignore : 'a t
+ (** No-operation ({ignore = fn _ => ()}). *)
+
+ val nop : unit t
+ (** No-operation ({nop = fn () => ()}). *)
+
+ val obs : 'a t -> 'a UnOp.t
+ (**
+ * Side-effecting I-combinator ({obs ef x = (ef x ; x)}). Using {obs}
+ * and {o} you can "attach" side-effects to a function. The name {obs}
+ * is short for {observe} and comes from the idea that the data is
+ * observed by the effect.
+ *)
+
+ val past : unit t -> 'a UnOp.t
+ (**
+ * Side-effecting I-combinator ({past ef x = (ef () ; x)}). Using
+ * {past} and {o} you can "attach" side-effects to a function. The
+ * name {past} comes from the idea that the data flows past the effect.
+ *)
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/effect.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: mltonlib/trunk/com/ssh/basic/unstable/public/export.sml
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/export.sml 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/export.sml 2006-11-17 12:38:45 UTC (rev 4829)
@@ -4,4 +4,49 @@
* See the file MLton-LICENSE for details.
*)
-structure Exit :> EXIT = Exit
+signature BIN_OP = BIN_OP
+signature BIN_PR = BIN_PR
+signature BUFFER = BUFFER
+signature CMP = CMP
+signature EFFECT = EFFECT
+signature EXIT = EXIT
+signature FIX = FIX
+signature FN = FN
+signature ISO = ISO
+signature ORDER = ORDER
+signature PAIR = PAIR
+signature PRODUCT = PRODUCT
+signature PRODUCT_TYPE = PRODUCT_TYPE
+signature READER = READER
+signature REF = REF
+signature SQ = SQ
+signature SUM = SUM
+signature THUNK = THUNK
+signature TIE = TIE
+signature UNIV = UNIV
+signature UN_OP = UN_OP
+signature UN_PR = UN_PR
+signature WRITER = WRITER
+
+structure BinOp : BIN_OP = BinOp
+structure BinPr : BIN_PR = BinPr
+structure Buffer : BUFFER = Buffer
+structure Cmp : CMP = Cmp
+structure Effect : EFFECT = Effect
+structure Exit : EXIT = Exit
+structure Fix : FIX = Fix
+structure Fn : FN = Fn
+structure Iso : ISO = Iso
+structure Order : ORDER = Order
+structure Pair : PAIR = Pair
+structure Product : PRODUCT = Product
+structure Reader : READER = Reader
+structure Ref : REF where type 'a t = 'a ref = Ref
+structure Sq : SQ = Sq
+structure Sum : SUM = Sum
+structure Thunk : THUNK = Thunk
+structure Tie : TIE = Tie
+structure UnOp : UN_OP = UnOp
+structure UnPr : UN_PR = UnPr
+structure Univ : UNIV = Univ
+structure Writer : WRITER = Writer
Added: mltonlib/trunk/com/ssh/basic/unstable/public/fix.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/fix.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/fix.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,14 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** Utilities for dealing with fixpoints. *)
+signature FIX = sig
+ type 'a t = 'a UnOp.t -> 'a
+ (** The type of fixpoint combinators. *)
+
+ exception Fix
+ (** Exception for reporting errors in computing fixpoints. *)
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/fix.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/fn.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/fn.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/fn.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,68 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** Utilities for dealing with functions. *)
+signature FN = sig
+ type ('a, 'b) t = 'a -> 'b
+ (** The type of functions. *)
+
+ val map : ('c -> 'a) * ('b -> 'd) -> ('a -> 'b) -> 'c -> 'd
+ (** {map (f, g) h = g o h o f}. *)
+
+ val const : 'a -> 'b -> 'a
+ (** K-combinator ({const x y = x}). *)
+
+ val curry : ('a * 'b -> 'c) -> 'a -> 'b -> 'c
+ (** Currying ({curry f x y = f (x, y)}). *)
+
+ val failing : exn -> 'a -> 'b
+ (**
+ * A failing function; {failing e} is equivalent to {fn _ => raise e},
+ * assuming {e} is a variable.
+ *)
+
+ val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
+ (** Flip the order of arguments ({flip f x y = f y x}). *)
+
+ val id : 'a -> 'a
+ (** I-combinator ({id x = x}). *)
+
+ val uncurry : ('a -> 'b -> 'c) -> 'a * 'b -> 'c
+ (** Uncurrying ({uncurry f (x, y) = f x y}). *)
+
+ val o : ('a -> 'b) * ('c -> 'a) -> 'c -> 'b
+ (** Function composition ({(g o f) x = f (g x)}). *)
+
+ val undefined : 'a -> 'b
+ (**
+ * An undefined function. This is equivalent to {failing (Fail
+ * "undefined")}.
+ *)
+
+ val <\ : 'a * ('a * 'b -> 'c) -> 'b -> 'c
+ (** Left section ({(x <\ f) y = f (x, y)}). *)
+
+ val \> : ('a -> 'b) * 'a -> 'b
+ (**
+ * Left application ({f \> x1 \> ... \> xN = f x1 ... xN}) and infix
+ * ({x0 <\f1\> x1 ... <\fN\> xN = fN (... f1 (x0, x1) ..., xN)}).
+ *)
+
+ val /> : ('a * 'b -> 'c) * 'b -> 'a -> 'c
+ (** Right section ({(f /> y) x = f (x, y)}). *)
+
+ val </ : 'a * ('a -> 'b) -> 'b
+ (**
+ * Right application ({xN </ ... </ x1 </ f = f x1 ... xN}) and infix
+ * ({xN </fN/> ... x1 </f1/> x0 = fN (xN, ... f1 (x1, x0) ...)}).
+ *)
+
+ val >| : 'a * ('a -> 'b) -> 'b
+ (** Left pipe ({x >| f1 >| ... >| fN = (fN o ... o f1) x}). *)
+
+ val |< : ('a -> 'b) * 'a -> 'b
+ (** Right pipe ({fN |< ... |< f1 |< x = (fN o ... o f1) x}). *)
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/fn.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/iso.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/iso.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/iso.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,23 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** Utilities for dealing with isomorphisms. *)
+signature ISO = sig
+ include ISO
+
+ val swap : ('a, 'b) t -> ('b, 'a) t
+
+ val map : ('c, 'a) t * ('b, 'd) t -> ('a, 'b) t -> ('c, 'd) t
+
+ val <--> : ('a, 'b) t * ('c, 'a) t -> ('c, 'b) t
+ (**
+ * Isomorphism composition.
+ *)
+
+ val --> : ('c, 'a) t * ('b, 'd) t -> (('a, 'b) Fn.t, ('c, 'd) Fn.t) t
+ val +` : ('a, 'c) t * ('b, 'd) t -> (('a, 'b) Sum.t, ('c, 'd) Sum.t) t
+ val *` : ('a, 'c) t * ('b, 'd) t -> (('a, 'b) Product.t, ('c, 'd) Product.t) t
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/iso.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/order.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/order.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/order.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,35 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** Utilities for dealing with the {order} datatype. *)
+signature ORDER = sig
+ datatype t = datatype order
+ (** The {order} datatype. *)
+
+ val swap : t UnOp.t
+ (**
+ * Swap order:
+ *
+ *> swap EQUAL = EQUAL
+ *> swap GREATER = LESS
+ *> swap LESS = GREATER
+ *)
+
+ val orWhenEq : t * t Thunk.t -> t
+ (**
+ * Sequencing of comparisons. {orWhenEq (a, bTh)} is equivalent to
+ *
+ *> case a of
+ *> EQUAL => bTh ()
+ *> | other => other
+ *)
+
+ (** == Predicates == *)
+
+ val isEqual : t UnPr.t (** {isEqual x = x = EQUAL} *)
+ val isGreater : t UnPr.t (** {isGreater x = x = GREATER} *)
+ val isLess : t UnPr.t (** {isLess x = x = LESS} *)
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/order.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/pair.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/pair.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/pair.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,12 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+signature PAIR = sig
+ type ('a, 'b) pair = 'a * 'b
+
+ include PRODUCT_TYPE
+ where type ('a, 'b) t = ('a, 'b) pair
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/pair.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/product-type.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/product-type.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/product-type.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,69 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+signature PRODUCT_TYPE = sig
+ type ('a, 'b) t
+
+ (** == Conversions == *)
+
+ val fromTuple2 : 'a * 'b -> ('a, 'b) t
+ val fromTuple3 : 'a * 'b * 'c -> (('a, 'b) t, 'c) t
+ val fromTuple4 : 'a * 'b * 'c * 'd -> ((('a, 'b) t, 'c) t, 'd) t
+ (**
+ * Conversions from tuples to products.
+ *)
+
+ val toTuple2 : ('a, 'b) t -> 'a * 'b
+ val toTuple3 : (('a, 'b) t, 'c) t -> 'a * 'b * 'c
+ val toTuple4 : ((('a, 'b) t, 'c) t, 'd) t -> 'a * 'b * 'c * 'd
+ (**
+ * Conversions from products to tuples.
+ *)
+
+ (** == Isomorphisms == *)
+
+ val isoTuple2 : ('a * 'b, ('a, 'b) t) Iso.iso
+ val isoTuple3 : ('a * 'b * 'c, (('a, 'b) t, 'c) t) Iso.iso
+ val isoTuple4 : ('a * 'b * 'c * 'd, ((('a, 'b) t, 'c) t, 'd) t) Iso.iso
+ (**
+ * Isomorphisms between products and tuples.
+ *)
+
+ (** == Operations == *)
+
+ val swap : ('a, 'b) t -> ('b, 'a) t
+ (** Swap the elements of a product. *)
+
+ val swizzle : ('a, 'b) t * ('c, 'd) t -> ('a * 'c, 'b * 'd) t
+ (** Swizzle the elements of a pair of products. *)
+
+ val fst : ('a, 'b) t -> 'a
+ (** Extract the first element of a product. *)
+
+ val snd : ('a, 'b) t -> 'b
+ (** Extract the second element of a product. *)
+
+ (** == HOFs for Building Operations on Products == *)
+
+ val app : 'a Effect.t * 'b Effect.t -> ('a, 'b) t Effect.t
+ val appFst : 'a Effect.t -> ('a, 'b) t Effect.t
+ val appSnd : 'b Effect.t -> ('a, 'b) t Effect.t
+
+ val map : ('a -> 'c) * ('b -> 'd) -> ('a, 'b) t -> ('c, 'd) t
+ val mapFst : ('a -> 'c) -> ('a, 'b) t -> ('c, 'b) t
+ val mapSnd : ('b -> 'c) -> ('a, 'b) t -> ('a, 'c) t
+
+ val all : 'a UnPr.t * 'b UnPr.t -> ('a, 'b) t UnPr.t
+ val exists : 'a UnPr.t * 'b UnPr.t -> ('a, 'b) t UnPr.t
+
+ val equal : 'a BinPr.t * 'b BinPr.t -> ('a, 'b) t BinPr.t
+ val collate : 'a Cmp.t * 'b Cmp.t -> ('a, 'b) t Cmp.t
+
+ val foldl : ('a * 'x -> 'y) * ('b * 'y -> 'z) -> ('a, 'b) t * 'x -> 'z
+ val foldr : ('a * 'y -> 'z) * ('b * 'x -> 'y) -> ('a, 'b) t * 'x -> 'z
+
+ val thunk : 'a Thunk.t * 'b Thunk.t -> ('a, 'b) t Thunk.t
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/product-type.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/product.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/product.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/product.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,18 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(**
+ * A general purpose product datatype.
+ *
+ * A product datatype is useful for reducing the inconvenience of matching
+ * nested products in combinator libraries (e.g. parser combinators).
+ *)
+signature PRODUCT = sig
+ datatype ('a, 'b) product = & of 'a * 'b
+
+ include PRODUCT_TYPE
+ where type ('a, 'b) t = ('a, 'b) product
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/product.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/reader.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/reader.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/reader.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,27 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** Utilities for dealing with readers. *)
+signature READER = sig
+ type ('a, 'b) t = 'b -> ('a * 'b) Option.t
+
+ (** == Monad Interface == *)
+
+ val return : 'a -> ('a, 's) t
+ val >>= : ('a, 's) t * ('a -> ('b, 's) t) -> ('b, 's) t
+
+ (** == Useful Combinators == *)
+
+ val map : ('a -> 'b) -> ('a, 's) t -> ('b, 's) t
+ val >>& : ('a, 's) t * ('b, 's) t -> (('a, 'b) Product.t, 's) t
+
+ (** == Typing == *)
+
+ type univ
+ type 'a u = ('a, univ) t
+
+ val polymorphically : ('a u -> 'b u) -> ('a, 's) t -> ('b, 's) t
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/reader.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/ref.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/ref.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/ref.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,61 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** Utilities for dealing with references. *)
+signature REF = sig
+ type 'a t
+ (**
+ * The type of references. This is left abstract to allow for
+ * different types of references. In particular, in addition to the
+ * built-in references of SML, one could implement, in a suitable
+ * extension to SML, a type of references whose various operations
+ * would be guaranteed to be atomic.
+ *)
+
+ val new : 'a -> 'a t
+ (** Creates a new reference to the given value. *)
+
+ val ! : 'a t -> 'a
+ (** Returns the value referred to by the given reference. *)
+
+ val := : ('a t * 'a) Effect.t
+ (** {r := v} makes the reference {r} refer to the value {v}. *)
+
+ val :=: : 'a t Sq.t Effect.t
+ (**
+ * Swaps the values referred to by the given references. Ignoring
+ * concurrency, {r1 :=: r2} is equivalent to
+ *
+ *> let
+ *> val v1 = !r1
+ *> val v2 = !r2
+ *> in
+ *> r1 := v2
+ *> ; r2 := v1
+ *> end
+ *)
+
+ val exchange : 'a t * 'a -> 'a
+ (**
+ * Ignoring concurrency, {exchange (r, v)} is equivalent to {!r before
+ * r := v}.
+ *)
+
+ val app : 'a Effect.t -> 'a t Effect.t
+ (** {app ef r} is equivalent to {ef (!r)}. *)
+
+ val map : ('a -> 'b) -> 'a t -> 'b t
+ (** {map f r} is equivalent to {new (f (!r))}. *)
+
+ val modify : 'a UnOp.t -> 'a t Effect.t
+ (** Ignoring concurrency, {modify f r} is equivalent to {r := f (!r)}. *)
+
+ val equal : 'a t BinPr.t
+ (**
+ * Returns true if the given references were, in fact, created by a
+ * single call to {new}. This is equivalent to {op =}.
+ *)
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/ref.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/sq.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/sq.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/sq.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,17 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(**
+ * Utilities for dealing with "squares", that is, pairs whose both
+ * elements are of the same type.
+ *)
+signature SQ = sig
+ type 'a t = 'a * 'a
+ (** The type of "squares". *)
+
+ val mk : 'a -> 'a t
+ (** {mk x = (x, x)}. *)
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/sq.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/sum.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/sum.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/sum.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,41 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(**
+ * A general purpose sum type.
+ *)
+signature SUM = sig
+ datatype ('a, 'b) sum = INL of 'a | INR of 'b
+ type ('a, 'b) t = ('a, 'b) sum
+
+ exception Sum
+
+ val sum : ('a -> 'c) * ('b -> 'c) -> ('a, 'b) t -> 'c
+
+ val swap : ('a, 'b) t -> ('b, 'a) t
+
+ val out : ('x, 'x) t -> 'x
+
+ val app : 'a Effect.t * 'b Effect.t -> ('a, 'b) t Effect.t
+
+ val map : ('a -> 'c) * ('b -> 'd) -> ('a, 'b) t -> ('c, 'd) t
+
+ val isL : ('a, 'b) t UnPr.t
+ val isR : ('a, 'b) t UnPr.t
+
+ val outL : ('a, 'b) t -> 'a
+ val outR : ('a, 'b) t -> 'b
+
+ val getL : ('a, 'b) t -> 'a UnOp.t
+ val getR : ('a, 'b) t -> 'b UnOp.t
+
+ val mapL : ('a -> 'c) -> ('a, 'b) t -> ('c, 'b) t
+ val mapR : ('b -> 'd) -> ('a, 'b) t -> ('a, 'd) t
+
+ val equal : 'a BinPr.t * 'b BinPr.t -> ('a, 'b) t BinPr.t
+
+ val collate : 'a Cmp.t * 'b Cmp.t -> ('a, 'b) t Cmp.t
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/sum.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/thunk.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/thunk.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/thunk.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,14 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** Utilities for dealing with thunks. *)
+signature THUNK = sig
+ type 'a t = unit -> 'a
+ (** The type of thunks or suspended computations (e.g. {fn () => exp}). *)
+
+ val mk : 'a -> 'a t
+ (** Constant thunk ({thunk x = let val x = x in fn () => x end}). *)
+end
Property changes on: mltonlib/trunk/com/ssh/basic/unstable/public/thunk.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/basic/unstable/public/tie.sig
===================================================================
--- mltonlib/trunk/com/ssh/basic/unstable/public/tie.sig 2006-11-16 11:19:34 UTC (rev 4828)
+++ mltonlib/trunk/com/ssh/basic/unstable/public/tie.sig 2006-11-17 12:38:45 UTC (rev 4829)
@@ -0,0 +1,89 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(**
+ * A framework for computing fixpoints.
+ *
+ * In a strict language you sometimes want to provide a fixpoint
+ * combinator for an abstract type {t} to make it possible to write
+ * recursive definitions. Un...
[truncated message content] |
|
From: Vesa K. <ve...@ml...> - 2006-11-16 03:19:36
|
Hid recently added functors.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/forget.use
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/forget.use
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/forget.use 2006-11-16 10:53:56 UTC (rev 4827)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/forget.use 2006-11-16 11:19:34 UTC (rev 4828)
@@ -10,6 +10,8 @@
"MkIntegerExt",
"MkRealExt",
"MkWordExt",
+ "MkSeqCommonExt",
+ "MkMonoSeqCommonExt",
"MkMonoVectorExt",
"MkMonoVectorSliceExt",
"MkMonoArrayExt",
|
|
From: Vesa K. <ve...@ml...> - 2006-11-16 02:53:59
|
Renamed dup -> duplicate (which was already being used in MLton).
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml 2006-11-16 10:49:19 UTC (rev 4826)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml 2006-11-16 10:53:56 UTC (rev 4827)
@@ -17,7 +17,7 @@
in
open Array Common
end
- fun dup a = tabulate (length a, fn i => sub (a, i))
+ fun duplicate a = tabulate (length a, fn i => sub (a, i))
val toVector = vector
fun fromVector v = tabulate (Vector.length v, fn i => Vector.sub (v, i))
val isoVector = (toVector, fromVector)
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun 2006-11-16 10:49:19 UTC (rev 4826)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun 2006-11-16 10:53:56 UTC (rev 4827)
@@ -20,7 +20,7 @@
in
open MonoArray Common
end
- fun dup a = tabulate (length a, fn i => sub (a, i))
+ fun duplicate a = tabulate (length a, fn i => sub (a, i))
val toVector = vector
fun fromVector v =
tabulate (MonoVector.length v, fn i => MonoVector.sub (v, i))
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig 2006-11-16 10:49:19 UTC (rev 4826)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig 2006-11-16 10:53:56 UTC (rev 4827)
@@ -15,10 +15,10 @@
* Convenience alias.
*)
- val dup : 'a t -> 'a t
+ val duplicate : 'a t -> 'a t
(**
- * Makes a fresh duplicate of the given array. {dup a} is equivalent
- * to {tabulate (length a, fn i => sub (a, i))}.
+ * Makes a fresh duplicate of the given array. {duplicate a} is
+ * equivalent to {tabulate (length a, fn i => sub (a, i))}.
*)
val unfoldi : (int * 'b -> 'a * 'b) -> int * 'b -> 'a t * 'b
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig 2006-11-16 10:49:19 UTC (rev 4826)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig 2006-11-16 10:53:56 UTC (rev 4827)
@@ -15,10 +15,10 @@
* Convenience alias.
*)
- val dup : t -> t
+ val duplicate : t -> t
(**
- * Makes a fresh duplicate of the given array. {dup a} is equivalent
- * to {tabulate (length a, fn i => sub (a, i))}.
+ * Makes a fresh duplicate of the given array. {duplicate a} is
+ * equivalent to {tabulate (length a, fn i => sub (a, i))}.
*)
val unfoldi : (int * 'a -> elem * 'a) -> int * 'a -> t * 'a
|
|
From: Vesa K. <ve...@ml...> - 2006-11-16 02:49:22
|
Added preliminary implementation of unfoldi to arrays and vectors. The
signature is curried and supposed to be more in the style of the Basis
library than MLton's internal libraries.
Factored out some repetition.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-seq-common-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-seq-common-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/funs.cm
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
U mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-vector.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/vector.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml 2006-11-15 18:35:09 UTC (rev 4825)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml 2006-11-16 10:49:19 UTC (rev 4826)
@@ -8,11 +8,16 @@
* Extended {Array :> ARRAY} structure.
*)
structure Array : ARRAY = struct
- open Array
- type 'a t = 'a array
+ local
+ structure Array = struct
+ open Array
+ type 'a t = 'a array
+ end
+ structure Common = MkSeqCommonExt (Array)
+ in
+ open Array Common
+ end
fun dup a = tabulate (length a, fn i => sub (a, i))
- fun toList a = foldr op :: [] a
- val isoList = (toList, fromList)
val toVector = vector
fun fromVector v = tabulate (Vector.length v, fn i => Vector.sub (v, i))
val isoVector = (toVector, fromVector)
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun 2006-11-15 18:35:09 UTC (rev 4825)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun 2006-11-16 10:49:19 UTC (rev 4826)
@@ -11,11 +11,16 @@
structure MonoArray : MONO_ARRAY
where type elem = MonoVector.elem
where type vector = MonoVector.vector) = struct
- open MonoArray
- type t = array
+ local
+ structure MonoArray = struct
+ open MonoArray
+ type t = array
+ end
+ structure Common = MkMonoSeqCommonExt (MonoArray)
+ in
+ open MonoArray Common
+ end
fun dup a = tabulate (length a, fn i => sub (a, i))
- fun toList a = foldr op :: [] a
- val isoList = (toList, fromList)
val toVector = vector
fun fromVector v =
tabulate (MonoVector.length v, fn i => MonoVector.sub (v, i))
@@ -24,4 +29,3 @@
fun fromPoly a = tabulate (Array.length a, fn i => Array.sub (a, i))
val isoPoly = (toPoly, fromPoly)
end
-
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-seq-common-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-seq-common-ext.fun 2006-11-15 18:35:09 UTC (rev 4825)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-seq-common-ext.fun 2006-11-16 10:49:19 UTC (rev 4826)
@@ -0,0 +1,23 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(**
+ * Functor to make common sequence (array or vector) extensions.
+ *)
+functor MkMonoSeqCommonExt (type t
+ type elem
+ val foldr : (elem * 'a -> 'a) -> 'a -> t -> 'a
+ val fromList : elem list -> t
+ val maxLen : int) = struct
+ fun unfoldi fis (n, s) = let
+ fun lp (i, s, xs) =
+ if i = n then (fromList (rev xs), s)
+ else case fis (i, s) of (x, s) => lp (i+1, s, x::xs)
+ in if n < 0 orelse maxLen < n then raise Size else lp (0, s, [])
+ end
+ fun toList t = foldr op :: [] t
+ val isoList = (toList, fromList)
+end
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-seq-common-ext.fun
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-ext.fun 2006-11-15 18:35:09 UTC (rev 4825)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-ext.fun 2006-11-16 10:49:19 UTC (rev 4826)
@@ -7,11 +7,16 @@
(**
* Functor for extending {MONO_VECTOR} modules.
*)
-functor MkMonoVectorExt (M : MONO_VECTOR) = struct
- open M
- type t = vector
- fun toList v = foldr op :: [] v
- val isoList = (toList, fromList)
+functor MkMonoVectorExt (MonoVector : MONO_VECTOR) = struct
+ local
+ structure MonoVector = struct
+ open MonoVector
+ type t = vector
+ end
+ structure Common = MkMonoSeqCommonExt (MonoVector)
+ in
+ open MonoVector Common
+ end
(* XXX It would be nice to avoid copying in toPoly and fromPoly *)
fun toPoly v = Vector.tabulate (length v, fn i => sub (v, i))
fun fromPoly v = tabulate (Vector.length v, fn i => Vector.sub (v, i))
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-seq-common-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-seq-common-ext.fun 2006-11-15 18:35:09 UTC (rev 4825)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-seq-common-ext.fun 2006-11-16 10:49:19 UTC (rev 4826)
@@ -0,0 +1,22 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(**
+ * Functor to make common sequence (array or vector) extensions.
+ *)
+functor MkSeqCommonExt (type 'a t
+ val foldr : ('a * 'b -> 'b) -> 'b -> 'a t -> 'b
+ val fromList : 'a list -> 'a t
+ val maxLen : int) = struct
+ fun unfoldi fis (n, s) = let
+ fun lp (i, s, xs) =
+ if i = n then (fromList (rev xs), s)
+ else case fis (i, s) of (x, s) => lp (i+1, s, x::xs)
+ in if n < 0 orelse maxLen < n then raise Size else lp (0, s, [])
+ end
+ fun toList t = foldr op :: [] t
+ val isoList = (toList, fromList)
+end
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-seq-common-ext.fun
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/funs.cm
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/funs.cm 2006-11-15 18:35:09 UTC (rev 4825)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/funs.cm 2006-11-16 10:49:19 UTC (rev 4826)
@@ -9,9 +9,11 @@
../mk-integer-ext.fun
../mk-mono-array-ext.fun
../mk-mono-array-slice-ext.fun
+ ../mk-mono-seq-common-ext.fun
../mk-mono-vector-ext.fun
../mk-mono-vector-slice-ext.fun
../mk-real-ext.fun
+ ../mk-seq-common-ext.fun
../mk-text-ext.fun
../mk-word-ext.fun
workarounds/basis.cm
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector.sml 2006-11-15 18:35:09 UTC (rev 4825)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector.sml 2006-11-16 10:49:19 UTC (rev 4826)
@@ -8,8 +8,13 @@
* Extended {Vector :> VECTOR} structure.
*)
structure Vector : VECTOR = struct
- open Vector
- type 'a t = 'a vector
- fun toList v = foldr op :: [] v
- val isoList = (toList, fromList)
+ local
+ structure Vector = struct
+ open Vector
+ type 'a t = 'a vector
+ end
+ structure Common = MkSeqCommonExt (Vector)
+ in
+ open Vector Common
+ end
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb 2006-11-15 18:35:09 UTC (rev 4825)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb 2006-11-16 10:49:19 UTC (rev 4826)
@@ -45,6 +45,8 @@
detail/mk-int-inf-ext.fun
detail/mk-real-ext.fun
detail/mk-word-ext.fun
+ detail/mk-seq-common-ext.fun
+ detail/mk-mono-seq-common-ext.fun
detail/mk-mono-vector-ext.fun
detail/mk-mono-vector-slice-ext.fun
detail/mk-mono-array-ext.fun
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use 2006-11-15 18:35:09 UTC (rev 4825)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use 2006-11-16 10:49:19 UTC (rev 4826)
@@ -28,6 +28,8 @@
"detail/mk-int-inf-ext.fun",
"detail/mk-real-ext.fun",
"detail/mk-word-ext.fun",
+ "detail/mk-seq-common-ext.fun",
+ "detail/mk-mono-seq-common-ext.fun",
"detail/mk-mono-vector-ext.fun",
"detail/mk-mono-vector-slice-ext.fun",
"detail/mk-mono-array-ext.fun",
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig 2006-11-15 18:35:09 UTC (rev 4825)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig 2006-11-16 10:49:19 UTC (rev 4826)
@@ -21,6 +21,13 @@
* to {tabulate (length a, fn i => sub (a, i))}.
*)
+ val unfoldi : (int * 'b -> 'a * 'b) -> int * 'b -> 'a t * 'b
+ (**
+ * {unfoldi f (n, b)} constructs an array a of length {n}, whose
+ * elements {ai} are determined by the equations {b0 = b} and {(ai,
+ * bi+1) = f (i, bi)}.
+ *)
+
(** == Conversions == *)
val fromVector : 'a vector -> 'a array
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig 2006-11-15 18:35:09 UTC (rev 4825)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig 2006-11-16 10:49:19 UTC (rev 4826)
@@ -21,6 +21,13 @@
* to {tabulate (length a, fn i => sub (a, i))}.
*)
+ val unfoldi : (int * 'a -> elem * 'a) -> int * 'a -> t * 'a
+ (**
+ * {unfoldi f (n, b)} constructs an array a of length {n}, whose
+ * elements {ai} are determined by the equations {b0 = b} and {(ai,
+ * bi+1) = f (i, bi)}.
+ *)
+
(** == Conversions == *)
val fromPoly : elem Array.array -> array
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-vector.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-vector.sig 2006-11-15 18:35:09 UTC (rev 4825)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-vector.sig 2006-11-16 10:49:19 UTC (rev 4826)
@@ -15,6 +15,13 @@
* Convenience alias.
*)
+ val unfoldi : (int * 'a -> elem * 'a) -> int * 'a -> t * 'a
+ (**
+ * {unfoldi f (n, b)} constructs a vector {v} of a length {n}, whose
+ * elements {vi} are determined by the equations {b0 = b} and {(vi,
+ * bi+1) = f (i, bi)}.
+ *)
+
(** == Conversions == *)
val fromPoly : elem Vector.vector -> vector
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/vector.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/vector.sig 2006-11-15 18:35:09 UTC (rev 4825)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/vector.sig 2006-11-16 10:49:19 UTC (rev 4826)
@@ -15,6 +15,13 @@
* Convenience alias.
*)
+ val unfoldi : (int * 'b -> 'a * 'b) -> int * 'b -> 'a t * 'b
+ (**
+ * {unfoldi f (n, b)} constructs a vector {v} of a length {n}, whose
+ * elements {vi} are determined by the equations {b0 = b} and {(vi,
+ * bi+1) = f (i, bi)}.
+ *)
+
(** == Conversions == *)
val toList : 'a vector -> 'a list
|
|
From: Stephen W. <sw...@ml...> - 2006-11-15 10:35:16
|
Adam Goode's patch to install PDF instead of .ps.gz versions of the ML-Lex and ML-Yacc documentation. ---------------------------------------------------------------------- U mlton/trunk/Makefile U mlton/trunk/mllex/Makefile U mlton/trunk/mlyacc/Makefile U mlton/trunk/mlyacc/doc/Makefile ---------------------------------------------------------------------- Modified: mlton/trunk/Makefile =================================================================== --- mlton/trunk/Makefile 2006-11-15 09:19:29 UTC (rev 4824) +++ mlton/trunk/Makefile 2006-11-15 18:35:09 UTC (rev 4825) @@ -440,8 +440,8 @@ ; do \ $(CP) $(SRC)/regression/$$f.sml $(TEXM)/; \ done - $(GZIP) -c $(LEX)/$(LEX).ps >$(TDOC)/$(LEX).ps.gz - $(GZIP) -c $(YACC)/$(YACC).ps >$(TDOC)/$(YACC).ps.gz + $(CP) $(LEX)/$(LEX).pdf $(TDOC) + $(CP) $(YACC)/$(YACC).pdf $(TDOC) find $(TDOC)/ -name .svn -type d | xargs rm -rf find $(TDOC)/ -name .ignore -type f | xargs rm -rf find $(TEXM)/ -name .svn -type d | xargs rm -rf Modified: mlton/trunk/mllex/Makefile =================================================================== --- mlton/trunk/mllex/Makefile 2006-11-15 09:19:29 UTC (rev 4824) +++ mlton/trunk/mllex/Makefile 2006-11-15 18:35:09 UTC (rev 4825) @@ -47,7 +47,7 @@ ../bin/clean .PHONY: docs -docs: mllex.ps +docs: mllex.pdf .PHONY: test test: $(NAME) Modified: mlton/trunk/mlyacc/Makefile =================================================================== --- mlton/trunk/mlyacc/Makefile 2006-11-15 09:19:29 UTC (rev 4824) +++ mlton/trunk/mlyacc/Makefile 2006-11-15 18:35:09 UTC (rev 4825) @@ -38,15 +38,21 @@ doc/mlyacc.ps: $(MAKE) -C doc mlyacc.ps +doc/mlyacc.pdf: + $(MAKE) -C doc mlyacc.pdf + mlyacc.ps: doc/mlyacc.ps cp doc/mlyacc.ps . +mlyacc.pdf: doc/mlyacc.pdf + cp doc/mlyacc.pdf . + .PHONY: clean clean: ../bin/clean .PHONY: docs -docs: mlyacc.ps +docs: mlyacc.pdf .PHONY: test test: $(NAME) Modified: mlton/trunk/mlyacc/doc/Makefile =================================================================== --- mlton/trunk/mlyacc/doc/Makefile 2006-11-15 09:19:29 UTC (rev 4824) +++ mlton/trunk/mlyacc/doc/Makefile 2006-11-15 18:35:09 UTC (rev 4825) @@ -6,7 +6,7 @@ # See the file MLton-LICENSE for details. ## -all: mlyacc.ps +all: mlyacc.pdf html/index.html: $(TEX_FILES) mkdir -p html |
|
From: Vesa K. <ve...@ml...> - 2006-11-15 01:19:39
|
Added dup to array modules.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml 2006-11-14 17:39:39 UTC (rev 4823)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array.sml 2006-11-15 09:19:29 UTC (rev 4824)
@@ -10,6 +10,7 @@
structure Array : ARRAY = struct
open Array
type 'a t = 'a array
+ fun dup a = tabulate (length a, fn i => sub (a, i))
fun toList a = foldr op :: [] a
val isoList = (toList, fromList)
val toVector = vector
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun 2006-11-14 17:39:39 UTC (rev 4823)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-ext.fun 2006-11-15 09:19:29 UTC (rev 4824)
@@ -13,6 +13,7 @@
where type vector = MonoVector.vector) = struct
open MonoArray
type t = array
+ fun dup a = tabulate (length a, fn i => sub (a, i))
fun toList a = foldr op :: [] a
val isoList = (toList, fromList)
val toVector = vector
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig 2006-11-14 17:39:39 UTC (rev 4823)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/array.sig 2006-11-15 09:19:29 UTC (rev 4824)
@@ -15,6 +15,12 @@
* Convenience alias.
*)
+ val dup : 'a t -> 'a t
+ (**
+ * Makes a fresh duplicate of the given array. {dup a} is equivalent
+ * to {tabulate (length a, fn i => sub (a, i))}.
+ *)
+
(** == Conversions == *)
val fromVector : 'a vector -> 'a array
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig 2006-11-14 17:39:39 UTC (rev 4823)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array.sig 2006-11-15 09:19:29 UTC (rev 4824)
@@ -15,6 +15,12 @@
* Convenience alias.
*)
+ val dup : t -> t
+ (**
+ * Makes a fresh duplicate of the given array. {dup a} is equivalent
+ * to {tabulate (length a, fn i => sub (a, i))}.
+ *)
+
(** == Conversions == *)
val fromPoly : elem Array.array -> array
|
|
From: Vesa K. <ve...@ml...> - 2006-11-14 09:39:40
|
Added isomorphisms between words and big/little endian byte vectors.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun 2006-11-14 17:08:09 UTC (rev 4822)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun 2006-11-14 17:39:39 UTC (rev 4823)
@@ -41,12 +41,14 @@
val toWord = Word.fromLarge o toLarge
val toWordX = Word.fromLarge o toLargeX
val embString = (toString, fromString)
+ val isoBigBytes = (toBigBytes, fromBigBytes)
val isoInt = (toInt, fromInt)
val isoIntX = (toIntX, fromInt)
val isoLarge = (toLarge, fromLarge)
val isoLargeInt = (toLargeInt, fromLargeInt)
val isoLargeIntX = (toLargeIntX, fromLargeInt)
val isoLargeX = (toLargeX, fromLarge)
+ val isoLittleBytes = (toLittleBytes, fromLittleBytes)
val isoWord = (toWord, fromWord)
val isoWordX = (toWordX, fromWordX)
fun isZero w = fromInt 0 = w
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig 2006-11-14 17:08:09 UTC (rev 4822)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig 2006-11-14 17:39:39 UTC (rev 4823)
@@ -116,6 +116,12 @@
(** == Isomorphisms == *)
+ val isoBigBytes : (word, Word8Vector.vector) Iso.t
+ (**
+ * An isomorphism between words and byte vectors. It is always
+ * equivalent to {(toBigBytes, fromBigBytes)}.
+ *)
+
val isoInt : (word, Int.int) Iso.t
(**
* An isomorphism between words of type {word} and the default integer
@@ -152,6 +158,12 @@
* type. It is always equivalent to {(toLargeX, fromLarge)}.
*)
+ val isoLittleBytes : (word, Word8Vector.vector) Iso.t
+ (**
+ * An isomorphism between words and byte vectors. It is always
+ * equivalent to {(toLittleBytes, fromLittleBytes)}.
+ *)
+
val isoWord : (word, Word.word) Iso.t
(**
* An isomorphism between words of type {word} and the default word
|
|
From: Vesa K. <ve...@ml...> - 2006-11-14 09:08:11
|
Added conversions to/from big/little endian byte vectors.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun 2006-11-14 12:59:50 UTC (rev 4821)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-word-ext.fun 2006-11-14 17:08:09 UTC (rev 4822)
@@ -11,8 +11,33 @@
open W
type t = word
val bounds as (minWord, maxWord) = (fromInt 0, fromInt~1)
+ val numBytes = Int.quot (Int.+ (wordSize, 7), 8)
+ local
+ fun mk fold bs =
+ if numBytes <> Word8Vector.length bs then
+ raise Subscript
+ else
+ fold (fn (b, w) =>
+ W.orb (W.<< (w, 0w8), W.fromLarge (Word8.toLarge b)))
+ (W.fromInt 0)
+ bs
+ in
+ val fromBigBytes = mk Word8Vector.foldl
+ val fromLittleBytes = mk Word8Vector.foldr
+ end
val fromWord = fromLarge o Word.toLarge
val fromWordX = fromLarge o Word.toLargeX
+ local
+ fun mk idx w =
+ Word8Vector.tabulate
+ (numBytes,
+ fn i =>
+ Word8.fromLarge
+ (W.toLarge (W.>> (w, Word.* (0w8, Word.fromInt (idx i))))))
+ in
+ val toBigBytes = mk (fn i => Int.- (Int.- (numBytes, 1), i))
+ val toLittleBytes = mk (fn i => i)
+ end
val toWord = Word.fromLarge o toLarge
val toWordX = Word.fromLarge o toLargeX
val embString = (toString, fromString)
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig 2006-11-14 12:59:50 UTC (rev 4821)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/word.sig 2006-11-14 17:08:09 UTC (rev 4822)
@@ -17,6 +17,12 @@
(** == Bounds == *)
+ val numBytes : int
+ (**
+ * The number of bytes (8-bit words) it takes to store a {word}. This
+ * is always equal to {(wordSize + 7) quot 8}.
+ *)
+
val maxWord : word
(**
* The maximal representable {word}. This is always equal to {fromInt
@@ -36,6 +42,22 @@
(** == Conversions == *)
+ val fromBigBytes : Word8Vector.vector -> word
+ (**
+ * Converts a vector of bytes in big-endian order to a word. Raises
+ * {Subscript} if the length of the given vector is not equal to
+ * {numBytes}. Extra bits, if any, in the most significant byte are
+ * ignored.
+ *)
+
+ val fromLittleBytes : Word8Vector.vector -> word
+ (**
+ * Converts a vector of bytes in little-endian order to a word. Raises
+ * {Subscript} if the length of the given vector is not equal to
+ * {numBytes}. Extra bits, if any, in the most significant byte are
+ * ignored.
+ *)
+
val fromWord : Word.word -> word
(**
* Converts the given word {w : Word.word} to the value {w(mod
@@ -53,6 +75,20 @@
* significant bit of {w}.
*)
+ val toBigBytes : word -> Word8Vector.vector
+ (**
+ * Converts the given word to a vector of bytes in big-endian order.
+ * Extra bits, if any, in the most significant byte will be set to
+ * zeroes.
+ *)
+
+ val toLittleBytes : word -> Word8Vector.vector
+ (**
+ * Converts the given word to a vector of bytes in little-endian order.
+ * Extra bits, if any, in the most significant byte will be set to
+ * zeroes.
+ *)
+
val toWord : word -> Word.word
(**
* Converts the given word {w : word} to the value {w(mod
|
|
From: Vesa K. <ve...@ml...> - 2006-11-14 05:00:32
|
Added extended mono slices. The only extension, at the moment, is the
convenience type alias.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/common.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-slice-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-slice-ext.fun
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-text-ext.fun
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlkit/mono-array-slices.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlkit/mono-vector-slices.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-array-slices.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-vector-slices.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/forget.use
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/mono-array-slices.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/mono-vector-slices.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/funs.cm
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/mono-array-slices.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/mono-vector-slices.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm
U mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
U mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-mlton.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-polyml.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-smlnj.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array-slice.sig
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-vector-slice.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/common.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/common.sml 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/common.sml 2006-11-14 12:59:50 UTC (rev 4821)
@@ -18,12 +18,18 @@
structure Word8 = MkWordExt (Word8)
structure Word8Vector = MkMonoVectorExt (Word8Vector)
+structure Word8VectorSlice =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = Word8VectorSlice)
structure Word8Array = MkMonoArrayExt (structure MonoArray = Word8Array
structure MonoVector = Word8Vector)
+structure Word8ArraySlice =
+ MkMonoArraySliceExt (structure MonoArraySlice = Word8ArraySlice)
structure Text = MkTextExt (Text)
structure Char = Text.Char
structure CharArray = Text.CharArray
+structure CharArraySlice = Text.CharArraySlice
structure CharVector = Text.CharVector
+structure CharVectorSlice = Text.CharVectorSlice
structure String = Text.String
structure Substring = Text.Substring
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-slice-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-slice-ext.fun 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-slice-ext.fun 2006-11-14 12:59:50 UTC (rev 4821)
@@ -0,0 +1,14 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(**
+ * Functor for extending {MONO_ARRAY_SLICE} modules.
+ *)
+functor MkMonoArraySliceExt (structure MonoArraySlice : MONO_ARRAY_SLICE) =
+struct
+ open MonoArraySlice
+ type t = slice
+end
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-array-slice-ext.fun
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-slice-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-slice-ext.fun 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-slice-ext.fun 2006-11-14 12:59:50 UTC (rev 4821)
@@ -0,0 +1,14 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(**
+ * Functor for extending {MONO_VECTOR_SLICE} modules.
+ *)
+functor MkMonoVectorSliceExt (structure MonoVectorSlice : MONO_VECTOR_SLICE) =
+struct
+ open MonoVectorSlice
+ type t = slice
+end
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-mono-vector-slice-ext.fun
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-text-ext.fun
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-text-ext.fun 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mk-text-ext.fun 2006-11-14 12:59:50 UTC (rev 4821)
@@ -20,10 +20,17 @@
end
structure CharVector = MkMonoVectorExt (CharVector)
+
+ structure CharVectorSlice =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = CharVectorSlice)
+
structure CharArray =
MkMonoArrayExt (structure MonoArray = CharArray
structure MonoVector = CharVector)
+ structure CharArraySlice =
+ MkMonoArraySliceExt (structure MonoArraySlice = CharArraySlice)
+
structure String = struct
open CharVector String
type t = string
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlkit/mono-array-slices.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlkit/mono-array-slices.sml 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlkit/mono-array-slices.sml 2006-11-14 12:59:50 UTC (rev 4821)
@@ -0,0 +1,7 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == Extended {MONO_ARRAY_SLICE} modules for MLKit == *)
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlkit/mono-array-slices.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlkit/mono-vector-slices.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlkit/mono-vector-slices.sml 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlkit/mono-vector-slices.sml 2006-11-14 12:59:50 UTC (rev 4821)
@@ -0,0 +1,7 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == Extended {MONO_VECTOR_SLICE} modules for MLKit == *)
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlkit/mono-vector-slices.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-array-slices.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-array-slices.sml 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-array-slices.sml 2006-11-14 12:59:50 UTC (rev 4821)
@@ -0,0 +1,43 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == Extended {MONO_ARRAY_SLICE} modules for MLton == *)
+
+structure BoolArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = BoolArraySlice)
+
+structure IntArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = IntArraySlice)
+structure LargeIntArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = LargeIntArraySlice)
+structure Int8ArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = Int8ArraySlice)
+structure Int16ArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = Int16ArraySlice)
+structure Int32ArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = Int32ArraySlice)
+structure Int64ArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = Int64ArraySlice)
+
+structure RealArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = RealArraySlice)
+structure LargeRealArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = LargeRealArraySlice)
+structure Real32ArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = Real32ArraySlice)
+structure Real64ArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = Real64ArraySlice)
+
+structure WordArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = WordArraySlice)
+structure LargeWordArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = LargeWordArraySlice)
+structure Word16ArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = Word16ArraySlice)
+structure Word32ArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = Word32ArraySlice)
+structure Word64ArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = Word64ArraySlice)
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-array-slices.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-vector-slices.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-vector-slices.sml 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-vector-slices.sml 2006-11-14 12:59:50 UTC (rev 4821)
@@ -0,0 +1,43 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == Extended {MONO_VECTOR_SLICE} modules for MLton == *)
+
+structure BoolVectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = BoolVectorSlice)
+
+structure IntVectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = IntVectorSlice)
+structure LargeIntVectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = LargeIntVectorSlice)
+structure Int8VectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = Int8VectorSlice)
+structure Int16VectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = Int16VectorSlice)
+structure Int32VectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = Int32VectorSlice)
+structure Int64VectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = Int64VectorSlice)
+
+structure RealVectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = RealVectorSlice)
+structure LargeRealVectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = LargeRealVectorSlice)
+structure Real32VectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = Real32VectorSlice)
+structure Real64VectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = Real64VectorSlice)
+
+structure WordVectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = WordVectorSlice)
+structure LargeWordVectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = LargeWordVectorSlice)
+structure Word16VectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = Word16VectorSlice)
+structure Word32VectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = Word32VectorSlice)
+structure Word64VectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = Word64VectorSlice)
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/mlton/mono-vector-slices.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/forget.use
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/forget.use 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/forget.use 2006-11-14 12:59:50 UTC (rev 4821)
@@ -11,5 +11,7 @@
"MkRealExt",
"MkWordExt",
"MkMonoVectorExt",
+ "MkMonoVectorSliceExt",
"MkMonoArrayExt",
+ "MkMonoArraySliceExt",
"MkTextExt"]
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/mono-array-slices.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/mono-array-slices.sml 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/mono-array-slices.sml 2006-11-14 12:59:50 UTC (rev 4821)
@@ -0,0 +1,13 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == Extended {MONO_ARRAY_SLICE} modules for Poly/ML == *)
+
+structure IntArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = IntArraySlice)
+
+structure RealArraySlice : MONO_ARRAY_SLICE =
+ MkMonoArraySliceExt (structure MonoArraySlice = RealArraySlice)
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/mono-array-slices.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/mono-vector-slices.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/mono-vector-slices.sml 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/mono-vector-slices.sml 2006-11-14 12:59:50 UTC (rev 4821)
@@ -0,0 +1,13 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == Extended {MONO_VECTOR_SLICE} modules for Poly/ML == *)
+
+structure IntVectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = IntVectorSlice)
+
+structure RealVectorSlice : MONO_VECTOR_SLICE =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = RealVectorSlice)
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/polyml/mono-vector-slices.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/funs.cm
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/funs.cm 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/funs.cm 2006-11-14 12:59:50 UTC (rev 4821)
@@ -8,7 +8,9 @@
../mk-int-inf-ext.fun
../mk-integer-ext.fun
../mk-mono-array-ext.fun
+ ../mk-mono-array-slice-ext.fun
../mk-mono-vector-ext.fun
+ ../mk-mono-vector-slice-ext.fun
../mk-real-ext.fun
../mk-text-ext.fun
../mk-word-ext.fun
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/mono-array-slices.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/mono-array-slices.sml 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/mono-array-slices.sml 2006-11-14 12:59:50 UTC (rev 4821)
@@ -0,0 +1,12 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == Extended {MONO_ARRAY_SLICE} modules for SML/NJ == *)
+
+structure RealArraySlice =
+ MkMonoArraySliceExt (structure MonoArraySlice = RealArraySlice)
+structure Real64ArraySlice =
+ MkMonoArraySliceExt (structure MonoArraySlice = Real64ArraySlice)
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/mono-array-slices.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/mono-vector-slices.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/mono-vector-slices.sml 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/mono-vector-slices.sml 2006-11-14 12:59:50 UTC (rev 4821)
@@ -0,0 +1,12 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == Extended {MONO_VECTOR_SLICE} modules for SML/NJ == *)
+
+structure RealVectorSlice =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = RealVectorSlice)
+structure Real64VectorSlice =
+ MkMonoVectorSliceExt (structure MonoVectorSlice = Real64VectorSlice)
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/mono-vector-slices.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm 2006-11-14 12:59:50 UTC (rev 4821)
@@ -14,7 +14,9 @@
../../public/integer.sig
../../public/iso.sig
../../public/list.sig
+ ../../public/mono-array-slice.sig
../../public/mono-array.sig
+ ../../public/mono-vector-slice.sig
../../public/mono-vector.sig
../../public/option.sig
../../public/real.sig
@@ -33,7 +35,9 @@
../list.sml
../option.sml
../smlnj/ints.sml
+ ../smlnj/mono-array-slices.sml
../smlnj/mono-arrays.sml
+ ../smlnj/mono-vector-slices.sml
../smlnj/mono-vectors.sml
../smlnj/reals.sml
../smlnj/words.sml
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb 2006-11-14 12:59:50 UTC (rev 4821)
@@ -46,7 +46,9 @@
detail/mk-real-ext.fun
detail/mk-word-ext.fun
detail/mk-mono-vector-ext.fun
+ detail/mk-mono-vector-slice-ext.fun
detail/mk-mono-array-ext.fun
+ detail/mk-mono-array-slice-ext.fun
detail/mk-text-ext.fun
(* Extended signatures *)
@@ -62,7 +64,9 @@
public/array.sig
public/array-slice.sig
public/mono-vector.sig
+ public/mono-vector-slice.sig
public/mono-array.sig
+ public/mono-array-slice.sig
public/char.sig
public/string.sig
public/substring.sig
@@ -81,7 +85,9 @@
detail/$(SML_COMPILER)/reals.sml
detail/$(SML_COMPILER)/words.sml
detail/$(SML_COMPILER)/mono-vectors.sml
+ detail/$(SML_COMPILER)/mono-vector-slices.sml
detail/$(SML_COMPILER)/mono-arrays.sml
+ detail/$(SML_COMPILER)/mono-array-slices.sml
detail/$(SML_COMPILER)/texts.sml
in
public/export-$(SML_COMPILER).sml
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use 2006-11-14 12:59:50 UTC (rev 4821)
@@ -29,7 +29,9 @@
"detail/mk-real-ext.fun",
"detail/mk-word-ext.fun",
"detail/mk-mono-vector-ext.fun",
+ "detail/mk-mono-vector-slice-ext.fun",
"detail/mk-mono-array-ext.fun",
+ "detail/mk-mono-array-slice-ext.fun",
"detail/mk-text-ext.fun",
(* Extended signatures *)
@@ -45,7 +47,9 @@
"public/array.sig",
"public/array-slice.sig",
"public/mono-vector.sig",
+ "public/mono-vector-slice.sig",
"public/mono-array.sig",
+ "public/mono-array-slice.sig",
"public/char.sig",
"public/string.sig",
"public/substring.sig",
@@ -64,7 +68,9 @@
"detail/"^compiler^"/reals.sml",
"detail/"^compiler^"/words.sml",
"detail/"^compiler^"/mono-vectors.sml",
+ "detail/"^compiler^"/mono-vector-slices.sml",
"detail/"^compiler^"/mono-arrays.sml",
+ "detail/"^compiler^"/mono-array-slices.sml",
"detail/"^compiler^"/texts.sml",
(* Forget implementation details (if possible) *)
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-mlton.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-mlton.sml 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-mlton.sml 2006-11-14 12:59:50 UTC (rev 4821)
@@ -7,7 +7,9 @@
(** == MLton specific extensions == *)
structure BoolArray : MONO_ARRAY = BoolArray
+structure BoolArraySlice : MONO_ARRAY_SLICE = BoolArraySlice
structure BoolVector : MONO_VECTOR = BoolVector
+structure BoolVectorSlice : MONO_VECTOR_SLICE = BoolVectorSlice
structure FixedInt : INTEGER = FixedInt
structure Int1 : INTEGER = Int1
structure Int10 : INTEGER = Int10
@@ -18,7 +20,9 @@
structure Int15 : INTEGER = Int15
structure Int16 : INTEGER = Int16
structure Int16Array : MONO_ARRAY = Int16Array
+structure Int16ArraySlice : MONO_ARRAY_SLICE = Int16ArraySlice
structure Int16Vector : MONO_VECTOR = Int16Vector
+structure Int16VectorSlice : MONO_VECTOR_SLICE = Int16VectorSlice
structure Int17 : INTEGER = Int17
structure Int18 : INTEGER = Int18
structure Int19 : INTEGER = Int19
@@ -38,35 +42,55 @@
structure Int31 : INTEGER = Int31
structure Int32 : INTEGER = Int32
structure Int32Array : MONO_ARRAY = Int32Array
+structure Int32ArraySlice : MONO_ARRAY_SLICE = Int32ArraySlice
structure Int32Vector : MONO_VECTOR = Int32Vector
+structure Int32VectorSlice : MONO_VECTOR_SLICE = Int32VectorSlice
structure Int4 : INTEGER = Int4
structure Int5 : INTEGER = Int5
structure Int6 : INTEGER = Int6
structure Int64 : INTEGER = Int64
structure Int64Array : MONO_ARRAY = Int64Array
+structure Int64ArraySlice : MONO_ARRAY_SLICE = Int64ArraySlice
structure Int64Vector : MONO_VECTOR = Int64Vector
+structure Int64VectorSlice : MONO_VECTOR_SLICE = Int64VectorSlice
structure Int7 : INTEGER = Int7
structure Int8 : INTEGER = Int8
structure Int8Array : MONO_ARRAY = Int8Array
+structure Int8ArraySlice : MONO_ARRAY_SLICE = Int8ArraySlice
structure Int8Vector : MONO_VECTOR = Int8Vector
+structure Int8VectorSlice : MONO_VECTOR_SLICE = Int8VectorSlice
structure Int9 : INTEGER = Int9
structure IntArray : MONO_ARRAY = IntArray
+structure IntArraySlice : MONO_ARRAY_SLICE = IntArraySlice
structure IntInf : INT_INF = IntInf
structure IntVector : MONO_VECTOR = IntVector
+structure IntVectorSlice : MONO_VECTOR_SLICE = IntVectorSlice
structure LargeIntArray : MONO_ARRAY = LargeIntArray
+structure LargeIntArraySlice : MONO_ARRAY_SLICE = LargeIntArraySlice
structure LargeIntVector : MONO_VECTOR = LargeIntVector
+structure LargeIntVectorSlice : MONO_VECTOR_SLICE = LargeIntVectorSlice
structure LargeRealArray : MONO_ARRAY = LargeRealArray
+structure LargeRealArraySlice : MONO_ARRAY_SLICE = LargeRealArraySlice
structure LargeRealVector : MONO_VECTOR = LargeRealVector
+structure LargeRealVectorSlice : MONO_VECTOR_SLICE = LargeRealVectorSlice
structure LargeWordArray : MONO_ARRAY = LargeWordArray
+structure LargeWordArraySlice : MONO_ARRAY_SLICE = LargeWordArraySlice
structure LargeWordVector : MONO_VECTOR = LargeWordVector
+structure LargeWordVectorSlice : MONO_VECTOR_SLICE = LargeWordVectorSlice
structure Real32 : REAL = Real32
structure Real32Array : MONO_ARRAY = Real32Array
+structure Real32ArraySlice : MONO_ARRAY_SLICE = Real32ArraySlice
structure Real32Vector : MONO_VECTOR = Real32Vector
+structure Real32VectorSlice : MONO_VECTOR_SLICE = Real32VectorSlice
structure Real64 : REAL = Real64
structure Real64Array : MONO_ARRAY = Real64Array
+structure Real64ArraySlice : MONO_ARRAY_SLICE = Real64ArraySlice
structure Real64Vector : MONO_VECTOR = Real64Vector
+structure Real64VectorSlice : MONO_VECTOR_SLICE = Real64VectorSlice
structure RealArray : MONO_ARRAY = RealArray
+structure RealArraySlice : MONO_ARRAY_SLICE = RealArraySlice
structure RealVector : MONO_VECTOR = RealVector
+structure RealVectorSlice : MONO_VECTOR_SLICE = RealVectorSlice
structure SysWord : WORD = SysWord
structure Word1 : WORD = Word1
structure Word10 : WORD = Word10
@@ -77,7 +101,9 @@
structure Word15 : WORD = Word15
structure Word16 : WORD = Word16
structure Word16Array : MONO_ARRAY = Word16Array
+structure Word16ArraySlice : MONO_ARRAY_SLICE = Word16ArraySlice
structure Word16Vector : MONO_VECTOR = Word16Vector
+structure Word16VectorSlice : MONO_VECTOR_SLICE = Word16VectorSlice
structure Word17 : WORD = Word17
structure Word18 : WORD = Word18
structure Word19 : WORD = Word19
@@ -97,14 +123,20 @@
structure Word31 : WORD = Word31
structure Word32 : WORD = Word32
structure Word32Array : MONO_ARRAY = Word32Array
+structure Word32ArraySlice : MONO_ARRAY_SLICE = Word32ArraySlice
structure Word32Vector : MONO_VECTOR = Word32Vector
+structure Word32VectorSlice : MONO_VECTOR_SLICE = Word32VectorSlice
structure Word4 : WORD = Word4
structure Word5 : WORD = Word5
structure Word6 : WORD = Word6
structure Word64 : WORD = Word64
structure Word64Array : MONO_ARRAY = Word64Array
+structure Word64ArraySlice : MONO_ARRAY_SLICE = Word64ArraySlice
structure Word64Vector : MONO_VECTOR = Word64Vector
+structure Word64VectorSlice : MONO_VECTOR_SLICE = Word64VectorSlice
structure Word7 : WORD = Word7
structure Word9 : WORD = Word9
structure WordArray : MONO_ARRAY = WordArray
+structure WordArraySlice : MONO_ARRAY_SLICE = WordArraySlice
structure WordVector : MONO_VECTOR = WordVector
+structure WordVectorSlice : MONO_VECTOR_SLICE = WordVectorSlice
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-polyml.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-polyml.sml 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-polyml.sml 2006-11-14 12:59:50 UTC (rev 4821)
@@ -9,8 +9,12 @@
structure BoolArray : MONO_ARRAY = BoolArray
structure BoolVector : MONO_VECTOR = BoolVector
structure IntArray : MONO_ARRAY = IntArray
+structure IntArraySlice : MONO_ARRAY_SLICE = IntArraySlice
structure IntVector : MONO_VECTOR = IntVector
+structure IntVectorSlice : MONO_VECTOR_SLICE = IntVectorSlice
structure RealArray : MONO_ARRAY = RealArray
+structure RealArraySlice : MONO_ARRAY_SLICE = RealArraySlice
structure RealVector : MONO_VECTOR = RealVector
+structure RealVectorSlice : MONO_VECTOR_SLICE = RealVectorSlice
structure SysWord : WORD = SysWord
structure Word8Vector : MONO_VECTOR = Word8Vector
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-smlnj.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-smlnj.sml 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/export-smlnj.sml 2006-11-14 12:59:50 UTC (rev 4821)
@@ -13,9 +13,13 @@
structure IntInf : INT_INF = IntInf
structure Real64 : REAL = Real64
structure Real64Array : MONO_ARRAY = Real64Array
+structure Real64ArraySlice : MONO_ARRAY_SLICE = Real64ArraySlice
structure Real64Vector : MONO_VECTOR = Real64Vector
+structure Real64VectorSlice : MONO_VECTOR_SLICE = Real64VectorSlice
structure RealArray : MONO_ARRAY = RealArray
+structure RealArraySlice : MONO_ARRAY_SLICE = RealArraySlice
structure RealVector : MONO_VECTOR = RealVector
+structure RealVectorSlice : MONO_VECTOR_SLICE = RealVectorSlice
structure SysWord : WORD = SysWord
structure Word31 : WORD = Word31
structure Word32 : WORD = Word32
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml 2006-11-14 12:59:50 UTC (rev 4821)
@@ -16,7 +16,9 @@
signature ISO = ISO
signature LIST = LIST
signature MONO_ARRAY = MONO_ARRAY
+signature MONO_ARRAY_SLICE = MONO_ARRAY_SLICE
signature MONO_VECTOR = MONO_VECTOR
+signature MONO_VECTOR_SLICE = MONO_VECTOR_SLICE
signature OPTION = OPTION
signature REAL = REAL
signature STRING = STRING
@@ -31,7 +33,9 @@
structure Bool : BOOL = Bool
structure Char : CHAR = Char
structure CharArray : MONO_ARRAY = CharArray
+structure CharArraySlice : MONO_ARRAY_SLICE = CharArraySlice
structure CharVector : MONO_VECTOR = CharVector
+structure CharVectorSlice : MONO_VECTOR_SLICE = CharVectorSlice
structure Emb : EMB = Emb
structure Int : INTEGER = Int
structure Iso : ISO = Iso
@@ -50,4 +54,6 @@
structure Word : WORD = Word
structure Word8 : WORD = Word8
structure Word8Array : MONO_ARRAY = Word8Array
+structure Word8ArraySlice : MONO_ARRAY_SLICE = Word8ArraySlice
structure Word8Vector : MONO_VECTOR = Word8Vector
+structure Word8VectorSlice : MONO_VECTOR_SLICE = Word8VectorSlice
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array-slice.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array-slice.sig 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array-slice.sig 2006-11-14 12:59:50 UTC (rev 4821)
@@ -0,0 +1,17 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(**
+ * Extended {MONO_ARRAY_SLICE} signature.
+ *)
+signature MONO_ARRAY_SLICE = sig
+ include MONO_ARRAY_SLICE
+
+ type t = slice
+ (**
+ * Convenience alias.
+ *)
+end
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-array-slice.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-vector-slice.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-vector-slice.sig 2006-11-14 09:37:47 UTC (rev 4820)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-vector-slice.sig 2006-11-14 12:59:50 UTC (rev 4821)
@@ -0,0 +1,17 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(**
+ * Extended {MONO_VECTOR_SLICE} signature.
+ *)
+signature MONO_VECTOR_SLICE = sig
+ include MONO_VECTOR_SLICE
+
+ type t = slice
+ (**
+ * Convenience alias.
+ *)
+end
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/public/mono-vector-slice.sig
___________________________________________________________________
Name: svn:eol-style
+ native
|
|
From: Vesa K. <ve...@ml...> - 2006-11-14 01:38:04
|
Added convenience aliases to polymorphic slices.
----------------------------------------------------------------------
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array-slice.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm
A mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector-slice.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
U mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/array-slice.sig
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/vector-slice.sig
----------------------------------------------------------------------
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array-slice.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array-slice.sml 2006-11-13 21:08:43 UTC (rev 4819)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array-slice.sml 2006-11-14 09:37:47 UTC (rev 4820)
@@ -0,0 +1,13 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(**
+ * Extended {ArraySlice :> ARRAY_SLICE} structure.
+ *)
+structure ArraySlice : ARRAY_SLICE = struct
+ open ArraySlice
+ type 'a t = 'a slice
+end
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/array-slice.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm 2006-11-13 21:08:43 UTC (rev 4819)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/smlnj/unsealed.cm 2006-11-14 09:37:47 UTC (rev 4820)
@@ -5,6 +5,7 @@
*)
group is
+ ../../public/array-slice.sig
../../public/array.sig
../../public/bool.sig
../../public/char.sig
@@ -20,8 +21,10 @@
../../public/string.sig
../../public/substring.sig
../../public/text.sig
+ ../../public/vector-slice.sig
../../public/vector.sig
../../public/word.sig
+ ../array-slice.sml
../array.sml
../bool.sml
../common.sml
@@ -34,6 +37,7 @@
../smlnj/mono-vectors.sml
../smlnj/reals.sml
../smlnj/words.sml
+ ../vector-slice.sml
../vector.sml
funs.cm
workarounds/basis.cm
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector-slice.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector-slice.sml 2006-11-13 21:08:43 UTC (rev 4819)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector-slice.sml 2006-11-14 09:37:47 UTC (rev 4820)
@@ -0,0 +1,13 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(**
+ * Extended {VectorSlice :> VECTOR_SLICE} structure.
+ *)
+structure VectorSlice : VECTOR_SLICE = struct
+ open VectorSlice
+ type 'a t = 'a slice
+end
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/vector-slice.sml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb 2006-11-13 21:08:43 UTC (rev 4819)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb 2006-11-14 09:37:47 UTC (rev 4820)
@@ -58,7 +58,9 @@
public/word.sig
public/list.sig
public/vector.sig
+ public/vector-slice.sig
public/array.sig
+ public/array-slice.sig
public/mono-vector.sig
public/mono-array.sig
public/char.sig
@@ -71,7 +73,9 @@
detail/option.sml
detail/list.sml
detail/vector.sml
+ detail/vector-slice.sml
detail/array.sml
+ detail/array-slice.sml
detail/common.sml
detail/$(SML_COMPILER)/ints.sml
detail/$(SML_COMPILER)/reals.sml
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use 2006-11-13 21:08:43 UTC (rev 4819)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use 2006-11-14 09:37:47 UTC (rev 4820)
@@ -41,7 +41,9 @@
"public/word.sig",
"public/list.sig",
"public/vector.sig",
+ "public/vector-slice.sig",
"public/array.sig",
+ "public/array-slice.sig",
"public/mono-vector.sig",
"public/mono-array.sig",
"public/char.sig",
@@ -54,7 +56,9 @@
"detail/option.sml",
"detail/list.sml",
"detail/vector.sml",
+ "detail/vector-slice.sml",
"detail/array.sml",
+ "detail/array-slice.sml",
"detail/common.sml",
"detail/"^compiler^"/ints.sml",
"detail/"^compiler^"/reals.sml",
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/public/array-slice.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/array-slice.sig 2006-11-13 21:08:43 UTC (rev 4819)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/array-slice.sig 2006-11-14 09:37:47 UTC (rev 4820)
@@ -0,0 +1,17 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(**
+ * Extended {ARRAY_SLICE} signature.
+ *)
+signature ARRAY_SLICE = sig
+ include ARRAY_SLICE
+
+ type 'a t = 'a slice
+ (**
+ * Convenience alias.
+ *)
+end
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/public/array-slice.sig
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml 2006-11-13 21:08:43 UTC (rev 4819)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml 2006-11-14 09:37:47 UTC (rev 4820)
@@ -7,6 +7,7 @@
(** == Implementation independent extensions == *)
signature ARRAY = ARRAY
+signature ARRAY_SLICE = ARRAY_SLICE
signature BOOL = BOOL
signature CHAR = CHAR
signature EMB = EMB
@@ -22,9 +23,11 @@
signature SUBSTRING = SUBSTRING
signature TEXT = TEXT
signature VECTOR = VECTOR
+signature VECTOR_SLICE = VECTOR_SLICE
signature WORD = WORD
structure Array : ARRAY = Array
+structure ArraySlice : ARRAY_SLICE = ArraySlice
structure Bool : BOOL = Bool
structure Char : CHAR = Char
structure CharArray : MONO_ARRAY = CharArray
@@ -43,6 +46,7 @@
structure Substring : SUBSTRING = Substring
structure Text : TEXT = Text
structure Vector : VECTOR = Vector
+structure VectorSlice : VECTOR_SLICE = VectorSlice
structure Word : WORD = Word
structure Word8 : WORD = Word8
structure Word8Array : MONO_ARRAY = Word8Array
Added: mltonlib/trunk/com/ssh/extended-basis/unstable/public/vector-slice.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/vector-slice.sig 2006-11-13 21:08:43 UTC (rev 4819)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/vector-slice.sig 2006-11-14 09:37:47 UTC (rev 4820)
@@ -0,0 +1,17 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(**
+ * Extended {VECTOR_SLICE} signature.
+ *)
+signature VECTOR_SLICE = sig
+ include VECTOR_SLICE
+
+ type 'a t = 'a slice
+ (**
+ * Convenience alias.
+ *)
+end
Property changes on: mltonlib/trunk/com/ssh/extended-basis/unstable/public/vector-slice.sig
___________________________________________________________________
Name: svn:eol-style
+ native
|
|
From: Stephen W. <sw...@ml...> - 2006-11-13 13:08:52
|
Improved error reporting. In particular use the file name as it
occurred in the user's input (e.g. in an MLB) rather than after we
regularize it. This fixes a bug on Cygwin where a user could have
/a/b/c/d.sml
in an MLB file and, if that file didn't exist would get an error
message involving
/a\b\c\d.sml
----------------------------------------------------------------------
U mlton/trunk/mlton/cm/cm.sml
U mlton/trunk/mlton/control/control.sig
U mlton/trunk/mlton/control/control.sml
U mlton/trunk/mlton/front-end/mlb-front-end.fun
U mlton/trunk/mlton/main/main.fun
----------------------------------------------------------------------
Modified: mlton/trunk/mlton/cm/cm.sml
===================================================================
--- mlton/trunk/mlton/cm/cm.sml 2006-11-13 17:26:06 UTC (rev 4818)
+++ mlton/trunk/mlton/cm/cm.sml 2006-11-13 21:08:43 UTC (rev 4819)
@@ -73,17 +73,20 @@
List.push (files, finalize m')
in
Control.checkFile
- (m, fail, fn () =>
- case File.suffix m of
- SOME "cm" =>
- loop (m, 0, relativize)
- | SOME "sml" => sml ()
- | SOME "sig" => sml ()
- | SOME "fun" => sml ()
- | SOME "ML" => sml ()
- | _ =>
- fail (concat ["MLton can't process ",
- m]))
+ (m,
+ {fail = fail,
+ name = m,
+ ok = fn () =>
+ case File.suffix m of
+ SOME "cm" =>
+ loop (m, 0, relativize)
+ | SOME "sml" => sml ()
+ | SOME "sig" => sml ()
+ | SOME "fun" => sml ()
+ | SOME "ML" => sml ()
+ | _ =>
+ fail (concat ["MLton can't process ",
+ m])})
end
end)
end)
Modified: mlton/trunk/mlton/control/control.sig
===================================================================
--- mlton/trunk/mlton/control/control.sig 2006-11-13 17:26:06 UTC (rev 4818)
+++ mlton/trunk/mlton/control/control.sig 2006-11-13 21:08:43 UTC (rev 4819)
@@ -32,7 +32,9 @@
(*------------------------------------*)
(* Error Reporting *)
(*------------------------------------*)
- val checkFile: File.t * (string -> 'a) * (unit -> 'a) -> 'a
+ val checkFile: File.t * {fail: string -> 'a,
+ name: string,
+ ok: unit -> 'a} -> 'a
val checkForErrors: string -> unit
val error: Region.t * Layout.t * Layout.t -> unit
val errorStr: Region.t * string -> unit
Modified: mlton/trunk/mlton/control/control.sml
===================================================================
--- mlton/trunk/mlton/control/control.sml 2006-11-13 17:26:06 UTC (rev 4818)
+++ mlton/trunk/mlton/control/control.sml 2006-11-13 21:08:43 UTC (rev 4819)
@@ -235,15 +235,15 @@
then die (concat ["compilation aborted: ", name, " reported errors"])
else ()
-fun checkFile (f: File.t, error: string -> 'a, k: unit -> 'a): 'a =
- let
- fun check (test, msg, k) =
- if not (test f)
- then error (concat ["File ", f, " ", msg])
- else k ()
+fun checkFile (f: File.t, {fail: string -> 'a, name, ok: unit -> 'a}): 'a = let
+ fun check (test, msg, k) =
+ if test f then
+ k ()
+ else
+ fail (concat ["File ", name, " ", msg])
in
check (File.doesExist, "does not exist", fn () =>
- check (File.canRead, "cannot be read", k))
+ check (File.canRead, "cannot be read", ok))
end
(*---------------------------------------------------*)
Modified: mlton/trunk/mlton/front-end/mlb-front-end.fun
===================================================================
--- mlton/trunk/mlton/front-end/mlb-front-end.fun 2006-11-13 17:26:06 UTC (rev 4818)
+++ mlton/trunk/mlton/front-end/mlb-front-end.fun 2006-11-13 21:08:43 UTC (rev 4819)
@@ -201,63 +201,67 @@
("fileUse", File.layout fileUse),
("relativize", Option.layout Dir.layout relativize)])
regularize
- fun lexAndParseProg {fileAbs: File.t, fileUse: File.t,
+ fun lexAndParseProg {fileAbs: File.t, fileOrig: File.t, fileUse: File.t,
fail: String.t -> Ast.Program.t} =
Ast.Basdec.Prog
({fileAbs = fileAbs, fileUse = fileUse},
Promise.delay
(fn () =>
Control.checkFile
- (fileUse, fail, fn () => FrontEnd.lexAndParseFile fileUse)))
+ (fileUse, {fail = fail,
+ name = fileOrig,
+ ok = fn () => FrontEnd.lexAndParseFile fileUse})))
and lexAndParseMLB {relativize: Dir.t option,
seen: (File.t * File.t * Region.t) list,
- fileAbs: File.t, fileUse: File.t,
+ fileAbs: File.t, fileOrig: File.t, fileUse: File.t,
fail: String.t -> Ast.Basdec.t, reg: Region.t} =
Ast.Basdec.MLB
({fileAbs = fileAbs, fileUse = fileUse},
Promise.delay
(fn () =>
Control.checkFile
- (fileUse, fail, fn () =>
- let
- val seen' = (fileAbs, fileUse, reg) :: seen
- in
- if List.exists (seen, fn (fileAbs', _, _) =>
- String.equals (fileAbs, fileAbs'))
- then (let open Layout
- in
- Control.error
- (reg, seq [str "Basis forms a cycle with ",
- File.layout fileUse],
- align (List.map (seen', fn (_, f, r) =>
- seq [Region.layout r,
- str ": ",
- File.layout f])))
- ; Ast.Basdec.empty
- end)
- else
- let
- val (_, basdec) =
- HashSet.lookupOrInsert
- (psi, String.hash fileAbs, fn (fileAbs', _) =>
- String.equals (fileAbs, fileAbs'), fn () =>
- let
- val cwd = OS.Path.dir fileAbs
- val basdec =
- Promise.delay
- (fn () =>
- wrapLexAndParse
- ({cwd = cwd,
- relativize = relativize,
- seen = seen'},
- lexAndParseFile, fileUse))
- in
- (fileAbs, basdec)
- end)
- in
- Promise.force basdec
- end
- end)))
+ (fileUse,
+ {fail = fail,
+ name = fileOrig,
+ ok = fn () => let
+ val seen' = (fileAbs, fileUse, reg) :: seen
+ in
+ if List.exists (seen, fn (fileAbs', _, _) =>
+ String.equals (fileAbs, fileAbs'))
+ then (let open Layout
+ in
+ Control.error
+ (reg, seq [str "Basis forms a cycle with ",
+ File.layout fileUse],
+ align (List.map (seen', fn (_, f, r) =>
+ seq [Region.layout r,
+ str ": ",
+ File.layout f])))
+ ; Ast.Basdec.empty
+ end)
+ else
+ let
+ val (_, basdec) =
+ HashSet.lookupOrInsert
+ (psi, String.hash fileAbs, fn (fileAbs', _) =>
+ String.equals (fileAbs, fileAbs'), fn () =>
+ let
+ val cwd = OS.Path.dir fileAbs
+ val basdec =
+ Promise.delay
+ (fn () =>
+ wrapLexAndParse
+ ({cwd = cwd,
+ relativize = relativize,
+ seen = seen'},
+ lexAndParseFile, fileUse))
+ in
+ (fileAbs, basdec)
+ end)
+ in
+ Promise.force basdec
+ end
+ end})))
and lexAndParseProgOrMLB {cwd, relativize, seen}
(fileOrig: File.t, reg: Region.t) =
let
@@ -274,23 +278,28 @@
end
val mlbExts = ["mlb"]
val progExts = ["ML","fun","sig","sml"]
- fun err () = fail (Ast.Basdec.Seq []) "has an unknown extension"
+ fun err () =
+ fail (Ast.Basdec.Seq [])
+ (concat ["File ", fileOrig, " has an unknown extension"])
in
case File.extension fileUse of
NONE => err ()
| SOME s =>
- if List.contains (mlbExts, s, String.equals)
- then lexAndParseMLB {relativize = relativize,
- seen = seen,
- fileAbs = fileAbs,
- fileUse = fileUse,
- fail = fail Ast.Basdec.empty,
- reg = reg}
- else if List.contains (progExts, s, String.equals)
- then lexAndParseProg {fileAbs = fileAbs,
- fileUse = fileUse,
- fail = fail Ast.Program.empty}
- else err ()
+ if List.contains (mlbExts, s, String.equals) then
+ lexAndParseMLB {relativize = relativize,
+ seen = seen,
+ fileAbs = fileAbs,
+ fileOrig = fileOrig,
+ fileUse = fileUse,
+ fail = fail Ast.Basdec.empty,
+ reg = reg}
+ else if List.contains (progExts, s, String.equals) then
+ lexAndParseProg {fileAbs = fileAbs,
+ fileOrig = fileOrig,
+ fileUse = fileUse,
+ fail = fail Ast.Program.empty}
+ else
+ err ()
end
and wrapLexAndParse (state, lexAndParse, arg) =
Ref.fluidLet
Modified: mlton/trunk/mlton/main/main.fun
===================================================================
--- mlton/trunk/mlton/main/main.fun 2006-11-13 17:26:06 UTC (rev 4818)
+++ mlton/trunk/mlton/main/main.fun 2006-11-13 21:08:43 UTC (rev 4819)
@@ -1041,8 +1041,10 @@
Place.CM => compileCM input
| Place.SML =>
Control.checkFile
- (input, fn s => raise Fail s,
- fn () => compileSml [input])
+ (input,
+ {fail = fn s => raise Fail s,
+ name = input,
+ ok = fn () => compileSml [input]})
| Place.MLB => compileMLB input
| Place.Generated => compileCSO (input :: csoFiles)
| Place.O => compileCSO (input :: csoFiles)
|
|
From: Vesa K. <ve...@ml...> - 2006-11-13 09:26:11
|
Added a few basic utilities.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bool.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/bool.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bool.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bool.sml 2006-11-13 15:09:54 UTC (rev 4817)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/bool.sml 2006-11-13 17:26:06 UTC (rev 4818)
@@ -10,4 +10,10 @@
structure Bool : BOOL = struct
open Bool
type t = bool
+ val equal = op = : bool * bool -> bool
+ val compare = fn (false, true) => LESS
+ | (true, false) => GREATER
+ | (_, _) => EQUAL
+ fun isFalse b = b = false
+ fun isTrue b = b = true
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/bool.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/bool.sig 2006-11-13 15:09:54 UTC (rev 4817)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/bool.sig 2006-11-13 17:26:06 UTC (rev 4818)
@@ -4,14 +4,22 @@
* See the file MLton-LICENSE for details.
*)
-(**
- * Extended {BOOL} signature.
- *)
+(** Extended {BOOL} signature. *)
signature BOOL = sig
include BOOL
type t = bool
- (**
- * Convenience alias.
- *)
+ (** Convenience alias. *)
+
+ val isTrue : t -> t
+ (** {isTrue x = x = true} *)
+
+ val isFalse : t -> t
+ (** {isFalse x = x = false} *)
+
+ val equal : t * t -> t
+ (** Equivalent to {op =}. *)
+
+ val compare : t * t -> order
+ (** An ordering on booleans. {false} is defined less than {true}. *)
end
|
|
From: Vesa K. <ve...@ml...> - 2006-11-13 07:09:56
|
Added isNone for symmetry.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/detail/option.sml
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/option.sig
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/detail/option.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/detail/option.sml 2006-11-13 00:15:32 UTC (rev 4816)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/detail/option.sml 2006-11-13 15:09:54 UTC (rev 4817)
@@ -10,4 +10,6 @@
structure Option : OPTION = struct
open Option
type 'a t = 'a option
+ val isNone = fn NONE => true
+ | SOME _ => false
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/option.sig
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/option.sig 2006-11-13 00:15:32 UTC (rev 4816)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/option.sig 2006-11-13 15:09:54 UTC (rev 4817)
@@ -14,4 +14,9 @@
(**
* Convenience alias.
*)
+
+ val isNone : 'a option -> bool
+ (**
+ * Returns {true} if given option is {NONE}; otherwise returns {false}.
+ *)
end
|
|
From: Vesa K. <ve...@ml...> - 2006-11-12 16:15:39
|
Separated top-level exports.
----------------------------------------------------------------------
U mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
U mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use
U mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml
A mltonlib/trunk/com/ssh/extended-basis/unstable/public/top-level.sml
----------------------------------------------------------------------
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb 2006-11-12 23:09:35 UTC (rev 4815)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.mlb 2006-11-13 00:15:32 UTC (rev 4816)
@@ -82,6 +82,7 @@
in
public/export-$(SML_COMPILER).sml
public/export.sml
+ public/top-level.sml
end
end
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use 2006-11-12 23:09:35 UTC (rev 4815)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/extensions.use 2006-11-13 00:15:32 UTC (rev 4816)
@@ -68,5 +68,6 @@
(* Export filter *)
"public/export-"^compiler^".sml",
- "public/export.sml"]
+ "public/export.sml",
+ "public/top-level.sml"]
end
Modified: mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml 2006-11-12 23:09:35 UTC (rev 4815)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml 2006-11-13 00:15:32 UTC (rev 4816)
@@ -6,9 +6,6 @@
(** == Implementation independent extensions == *)
-type ('a, 'b) emb = ('a, 'b) Emb.t
-type ('a, 'b) iso = ('a, 'b) Iso.t
-
signature ARRAY = ARRAY
signature BOOL = BOOL
signature CHAR = CHAR
Copied: mltonlib/trunk/com/ssh/extended-basis/unstable/public/top-level.sml (from rev 4813, mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml)
===================================================================
--- mltonlib/trunk/com/ssh/extended-basis/unstable/public/export.sml 2006-11-12 15:34:03 UTC (rev 4813)
+++ mltonlib/trunk/com/ssh/extended-basis/unstable/public/top-level.sml 2006-11-13 00:15:32 UTC (rev 4816)
@@ -0,0 +1,10 @@
+(* Copyright (C) 2006 SSH Communications Security, Helsinki, Finland
+ *
+ * MLton is released under a BSD-style license.
+ * See the file MLton-LICENSE for details.
+ *)
+
+(** == Top-Level Bindings == *)
+
+type ('a, 'b) emb = ('a, 'b) Emb.t
+type ('a, 'b) iso = ('a, 'b) Iso.t
|
|
From: Stephen W. <sw...@ml...> - 2006-11-12 15:09:42
|
Tagged 20061107 Debian release. ---------------------------------------------------------------------- A mlton/tags/on-20061107/ ---------------------------------------------------------------------- Copied: mlton/tags/on-20061107 (from rev 4814, mlton/trunk) |
|
From: Stephen W. <sw...@ml...> - 2006-11-12 15:04:58
|
Switched from fixed-heap 512m to max-heap 640m. ---------------------------------------------------------------------- U mlton/trunk/mlton/Makefile U mlton/trunk/package/debian/changelog ---------------------------------------------------------------------- Modified: mlton/trunk/mlton/Makefile =================================================================== --- mlton/trunk/mlton/Makefile 2006-11-12 15:34:03 UTC (rev 4813) +++ mlton/trunk/mlton/Makefile 2006-11-12 23:04:57 UTC (rev 4814) @@ -18,7 +18,7 @@ UP = upgrade-basis.sml PATH = $(BIN):$(shell echo $$PATH) -FLAGS = @MLton ram-slop 0.7 gc-summary $(RUNTIME_ARGS) -- +FLAGS = @MLton max-heap 640m ram-slop 0.7 gc-summary $(RUNTIME_ARGS) -- ifeq (self, $(shell if [ -x $(BIN)/mlton ]; then echo self; fi)) # We're compiling MLton with itself, so don't use any stubs. Modified: mlton/trunk/package/debian/changelog =================================================================== --- mlton/trunk/package/debian/changelog 2006-11-12 15:34:03 UTC (rev 4813) +++ mlton/trunk/package/debian/changelog 2006-11-12 23:04:57 UTC (rev 4814) @@ -1,3 +1,10 @@ +mlton (20061107-1) unstable; urgency=low + + * new upstream version + * Use max-heap 640m instead of fixed-heap 512m. hopefully closes: #396980 + + -- Stephen Weeks <sw...@sw...> Tue, 07 Nov 2006 14:01:53 -0800 + mlton (20061026-1) unstable; urgency=low * new upstream version |