1(* 2 Title: Standard Basis Library: WORD Signature 3 Copyright David Matthews 1999, 2005, 2012, 2016 4 5 This library is free software; you can redistribute it and/or 6 modify it under the terms of the GNU Lesser General Public 7 License version 2.1 as published by the Free Software Foundation. 8 9 This library is distributed in the hope that it will be useful, 10 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 Lesser General Public License for more details. 13 14 You should have received a copy of the GNU Lesser General Public 15 License along with this library; if not, write to the Free Software 16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17*) 18 19(* This depends on there being suitable definitions of both Word and LargeWord 20 structures. We have basic definitions of those before we define this. *) 21signature WORD = 22sig 23 eqtype word 24 val wordSize : int 25 val toLarge : word -> LargeWord.word 26 val toLargeX : word -> LargeWord.word 27 val toLargeWord : word -> LargeWord.word 28 val toLargeWordX : word -> LargeWord.word 29 val fromLarge : LargeWord.word -> word 30 val fromLargeWord : LargeWord.word -> word 31 val toLargeInt : word -> LargeInt.int 32 val toLargeIntX : word -> LargeInt.int 33 val fromLargeInt : LargeInt.int -> word 34 val toInt : word -> Int.int 35 val toIntX : word -> Int.int 36 val fromInt : Int.int -> word 37 val orb : (word * word) -> word 38 val xorb : (word * word) -> word 39 val andb : (word * word) -> word 40 val notb : word -> word 41 val << : (word * Word.word) -> word 42 val >> : (word * Word.word) -> word 43 val ~>> : (word * Word.word) -> word 44 val + : (word * word) -> word 45 val - : (word * word) -> word 46 val * : (word * word) -> word 47 val div : (word * word) -> word 48 val mod : (word * word) -> word 49 val ~ : word -> word 50 val compare : (word * word) -> General.order 51 val > : (word * word) -> bool 52 val < : (word * word) -> bool 53 val >= : (word * word) -> bool 54 val <= : (word * word) -> bool 55 val min : (word * word) -> word 56 val max : (word * word) -> word 57 val fmt : StringCvt.radix -> word -> string 58 val toString : word -> string 59 val fromString : string -> word option 60 val scan : StringCvt.radix -> (char, 'a) StringCvt.reader -> (word, 'a) StringCvt.reader 61end; 62