forked from Ravenbrook/mlworks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recovering and editing old New Jersey ML bootstrapping files and adju…
…sting them to work under Standard ML of New Jersey v110.75 as far as the MLWorks structure, which is out-of-date with respect to the MLWORKS signature.
- Loading branch information
Showing
10 changed files
with
3,288 additions
and
11 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
(* | ||
* The arrays module. | ||
* | ||
* Copyright (c) 1992 Harlequin Ltd. | ||
* | ||
* $Log: array.sml,v $ | ||
* Revision 1.6 1996/05/21 11:48:15 matthew | ||
* Removing Copy exception, (replacing with Subscript) | ||
* | ||
* Revision 1.5 1993/02/25 18:13:17 matthew | ||
* Removed Array.T from signature | ||
* | ||
* Revision 1.4 1992/12/21 12:41:04 daveb | ||
* Added the agreed 'Array' structure. Renamed the existing Array structure | ||
* to ExtendedArray. | ||
* | ||
* Revision 1.3 1992/08/25 13:51:36 richard | ||
* Strengthened the types of all values for which it was possible. | ||
* Added tabulate. | ||
* | ||
* Revision 1.2 1992/08/20 12:24:43 richard | ||
* Enriched the ARRAY signature. | ||
* | ||
* Revision 1.1 1992/08/07 10:17:13 davidt | ||
* Initial revision | ||
* | ||
* | ||
*) | ||
|
||
signature ARRAY = | ||
sig | ||
eqtype 'a array | ||
(* | ||
eqtype 'a T | ||
sharing type T = array | ||
*) | ||
exception Size | ||
exception Subscript | ||
val array: int * '_a -> '_a array | ||
val arrayoflist: '_a list -> '_a array | ||
val tabulate: int * (int -> '_a) -> '_a array | ||
val sub: 'a array * int -> 'a | ||
val update: 'a array * int * 'a -> unit | ||
val length: 'a array -> int | ||
end | ||
|
||
signature EXTENDED_ARRAY = | ||
sig | ||
(* include "ARRAY" -- omitted to keep SML/NJ happy. *) | ||
eqtype 'a array | ||
(* | ||
eqtype 'a T | ||
sharing type T = array | ||
*) | ||
exception Size | ||
exception Subscript | ||
exception Find | ||
|
||
val array : int * '_a -> '_a array | ||
val length : 'a array -> int | ||
val update : 'a array * int * 'a -> unit | ||
val sub : 'a array * int -> 'a | ||
val arrayoflist : '_a list -> '_a array | ||
val tabulate : int * (int -> '_a) -> '_a array | ||
|
||
val from_list : '_a list -> '_a array | ||
val to_list : 'a array -> 'a list | ||
val fill : 'a array * 'a -> unit | ||
val map : ('a -> '_b) -> 'a array -> '_b array | ||
val map_index : (int * 'a -> '_b) -> 'a array -> '_b array | ||
val iterate : ('a -> unit) -> 'a array -> unit | ||
val iterate_index : (int * 'a -> unit) -> 'a array -> unit | ||
val rev : '_a array -> '_a array | ||
val duplicate : '_a array -> '_a array | ||
val subarray : '_a array * int * int -> '_a array | ||
val append : '_a array * '_a array -> '_a array | ||
val reducel : ('a * 'b -> 'a) -> ('a * 'b array) -> 'a | ||
val reducer : ('a * 'b -> 'b) -> ('a array * 'b) -> 'b | ||
val reducel_index : (int * 'a * 'b -> 'a) -> ('a * 'b array) -> 'a | ||
val reducer_index : (int * 'a * 'b -> 'b) -> ('a array * 'b) -> 'b | ||
val copy : 'a array * int * int * 'a array * int -> unit | ||
val fill_range : 'a array * int * int * 'a -> unit | ||
val find : ('a -> bool) -> 'a array -> int | ||
val find_default : (('a -> bool) * int) -> 'a array -> int | ||
val maxLen : int | ||
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(* ==== PERVASIVE BITS SIGNATURE ==== | ||
* | ||
* Copyright (C) 1992 Harlequin Ltd. | ||
* | ||
* Revision Log | ||
* ------------ | ||
* $Log: bits.sml,v $ | ||
* Revision 1.1 1992/08/25 08:09:51 richard | ||
* Initial revision | ||
* | ||
*) | ||
|
||
signature BITS = | ||
sig | ||
val andb : int * int -> int | ||
val orb : int * int -> int | ||
val xorb : int * int -> int | ||
val lshift : int * int -> int | ||
val rshift : int * int -> int | ||
val arshift : int * int -> int | ||
val notb : int -> int | ||
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
(* ==== PERVASIVE BYTEARRAY STRUCTURE ==== | ||
* | ||
* Copyright (C) 1992 Harlequin Ltd. | ||
* | ||
* Description | ||
* ----------- | ||
* Byte arrays are mutable objects which resemble arrays by may only | ||
* contain integers in the range [0, 255]. | ||
* | ||
* Revision Log | ||
* ------------ | ||
* $Log: bytearray.sml,v $ | ||
* Revision 1.4 1996/05/21 11:47:55 matthew | ||
* Removing Copy exception, (replacing with Subscript) | ||
* | ||
* Revision 1.3 1993/03/24 17:28:49 jont | ||
* Added Find to list of visible exceptions | ||
* | ||
* Revision 1.2 1993/02/25 18:17:01 matthew | ||
* Remove ByteArray.T from signature | ||
* | ||
* Revision 1.1 1992/08/24 10:29:04 richard | ||
* Initial revision | ||
* | ||
*) | ||
|
||
signature BYTEARRAY = | ||
sig | ||
eqtype bytearray | ||
|
||
exception Range of int | ||
exception Size | ||
exception Subscript | ||
exception Substring | ||
exception Find | ||
|
||
val array : int * int -> bytearray | ||
val length : bytearray -> int | ||
val update : bytearray * int * int -> unit | ||
val sub : bytearray * int -> int | ||
val arrayoflist : int list -> bytearray | ||
|
||
val tabulate : int * (int -> int) -> bytearray | ||
val from_list : int list -> bytearray | ||
val to_list : bytearray -> int list | ||
val from_string : string -> bytearray | ||
val to_string : bytearray -> string | ||
val fill : bytearray * int -> unit | ||
val map : (int -> int) -> bytearray -> bytearray | ||
val map_index : (int * int -> int) -> bytearray -> bytearray | ||
val iterate : (int -> unit) -> bytearray -> unit | ||
val iterate_index : (int * int -> unit) -> bytearray -> unit | ||
val rev : bytearray -> bytearray | ||
val duplicate : bytearray -> bytearray | ||
val subarray : bytearray * int * int -> bytearray | ||
val substring : bytearray * int * int -> string | ||
val append : bytearray * bytearray -> bytearray | ||
val reducel : ('a * int -> 'a) -> ('a * bytearray) -> 'a | ||
val reducer : (int * 'a -> 'a) -> (bytearray * 'a) -> 'a | ||
val reducel_index : (int * 'a * int -> 'a) -> ('a * bytearray) -> 'a | ||
val reducer_index : (int * int * 'a -> 'a) -> (bytearray * 'a) -> 'a | ||
val copy : bytearray * int * int * bytearray * int -> unit | ||
val fill_range : bytearray * int * int * int -> unit | ||
val find : (int -> bool) -> bytearray -> int | ||
val find_default : ((int -> bool) * int) -> bytearray -> int | ||
val maxLen : int | ||
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
(* ==== PERVASIVE FLOATARRAY STRUCTURE ==== | ||
* | ||
* Copyright (C) 1996 Harlequin Ltd. | ||
* | ||
* Description | ||
* ----------- | ||
* Float arrays are mutable objects which differ from arrays of floats | ||
* in that the entries are not individually boxed. | ||
* | ||
* | ||
* Revision Log | ||
* ------------ | ||
* $Log: floatarray.sml,v $ | ||
* Revision 1.1 1997/01/07 12:44:38 andreww | ||
* new unit | ||
* [Bug #1818] | ||
* Signature for the new pervasive FloatArray structure | ||
* | ||
* | ||
*) | ||
|
||
signature FLOATARRAY = | ||
sig | ||
eqtype floatarray | ||
|
||
exception Range of int | ||
exception Size | ||
exception Subscript | ||
exception Find | ||
|
||
val array : int * real -> floatarray | ||
val length : floatarray -> int | ||
val update : floatarray * int * real -> unit | ||
val sub : floatarray * int -> real | ||
val arrayoflist : real list -> floatarray | ||
|
||
val tabulate : int * (int -> real) -> floatarray | ||
val from_list : real list -> floatarray | ||
val to_list : floatarray -> real list | ||
val fill : floatarray * real -> unit | ||
val map : (real -> real) -> floatarray -> floatarray | ||
val map_index : (int * real -> real) -> floatarray -> floatarray | ||
val iterate : (real -> unit) -> floatarray -> unit | ||
val iterate_index : (int * real -> unit) -> floatarray -> unit | ||
val rev : floatarray -> floatarray | ||
val duplicate : floatarray -> floatarray | ||
val subarray : floatarray * int * int -> floatarray | ||
val append : floatarray * floatarray -> floatarray | ||
val reducel : ('a * real -> 'a) -> ('a * floatarray) -> 'a | ||
val reducer : (real * 'a -> 'a) -> (floatarray * 'a) -> 'a | ||
val reducel_index : (int * 'a * real -> 'a) -> ('a * floatarray) -> 'a | ||
val reducer_index : (int * real * 'a -> 'a) -> (floatarray * 'a) -> 'a | ||
val copy : floatarray * int * int * floatarray * int -> unit | ||
val fill_range : floatarray * int * int * real -> unit | ||
val find : (real -> bool) -> floatarray -> int | ||
val find_default : ((real -> bool) * int) -> floatarray -> int | ||
val maxLen : int | ||
end; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
(* ==== INITIAL BASIS : GENERAL ==== | ||
* | ||
* Copyright (C) 1995 Harlequin Ltd. | ||
* | ||
* Description | ||
* ----------- | ||
* This is part of the extended Initial Basis. | ||
* | ||
* Revision Log | ||
* ------------ | ||
* $Log: general.sml,v $ | ||
* Revision 1.4 1997/08/04 12:43:59 brucem | ||
* [Bug #30084] | ||
* Remove items which have been moved to Option. | ||
* And delete the stub structure which previously declared datatype option. | ||
* | ||
* Revision 1.3 1997/05/01 11:48:58 jont | ||
* [Bug #30088] | ||
* Get rid of MLWorks.Option | ||
* | ||
* Revision 1.2 1996/07/11 10:22:43 andreww | ||
* Adding exception Empty. | ||
* | ||
* Revision 1.1 1996/06/25 09:56:42 andreww | ||
* new unit | ||
* Addition to the pervasive library. | ||
* | ||
* Revision 1.3 1996/05/08 14:53:41 jont | ||
* Update to latest revision | ||
* | ||
* Revision 1.2 1996/04/23 13:05:43 matthew | ||
* Updating | ||
* | ||
* Revision 1.1 1996/04/18 11:42:57 jont | ||
* new unit | ||
* | ||
* Revision 1.4 1996/03/28 12:29:02 matthew | ||
* Fixing rigid type sharing problem | ||
* | ||
* Revision 1.3 1995/03/31 13:44:07 brianm | ||
* Adding options operators to General ... | ||
* | ||
* Revision 1.2 1995/03/12 18:49:24 brianm | ||
* Commented out troublesome datatypes and equality definitions. | ||
* | ||
* Revision 1.1 1995/03/08 16:23:04 brianm | ||
* new unit | ||
* | ||
*) | ||
|
||
signature GENERAL = | ||
sig | ||
eqtype unit | ||
type exn | ||
|
||
exception Bind | ||
exception Match | ||
exception Subscript | ||
exception Size | ||
exception Overflow | ||
exception Domain | ||
exception Div | ||
exception Chr | ||
exception Fail of string | ||
exception Empty | ||
|
||
val exnName : exn -> string | ||
val exnMessage : exn -> string | ||
|
||
datatype order = LESS | EQUAL | GREATER | ||
|
||
val <> : (''a * ''a) -> bool | ||
|
||
val ! : 'a ref -> 'a | ||
|
||
val := : ('a ref * 'a) -> unit | ||
|
||
val o : (('b -> 'c) * ('a -> 'b)) -> 'a -> 'c | ||
|
||
val before : ('a * unit) -> 'a | ||
|
||
val ignore : 'a -> unit | ||
|
||
end |
Oops, something went wrong.