Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/branches/num64/system/Basis/Implementation/word8.sml
ViewVC logotype

Diff of /sml/branches/num64/system/Basis/Implementation/word8.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5252, Sat Jun 1 19:56:51 2019 UTC revision 5253, Sat Jun 1 21:11:08 2019 UTC
# Line 9  Line 9 
9    
10      structure W8 = InlineT.Word8      structure W8 = InlineT.Word8
11      structure Word = InlineT.Word      structure Word = InlineT.Word
12      structure LW = Word32Imp      structure LW = LargeWordImp
13    
14      type word = Word8.word              (* tagged word *)      type word = Word8.word              (* tagged word *)
15    
# Line 72  Line 72 
72      val min : word * word -> word = W8.min      val min : word * word -> word = W8.min
73      val max : word * word -> word = W8.max      val max : word * word -> word = W8.max
74    
75      fun fmt radix = (NumFormat32.fmtWord radix) o toLargeWord      fun fmt radix = (NumFormat32.fmtWord radix) o InlineT.Word32.fromLarge o toLargeWord
76      val toString = fmt StringCvt.HEX      val toString = fmt StringCvt.HEX
77    
78      fun scan radix = let      fun scan radix = let
# Line 81  Line 81 
81                   of NONE => NONE                   of NONE => NONE
82                    | (SOME(w, cs')) => if InlineT.Word32.>(w, 0w255)                    | (SOME(w, cs')) => if InlineT.Word32.>(w, 0w255)
83                        then raise Overflow                        then raise Overflow
84                        else SOME(fromLargeWord w, cs')                        else SOME(fromLargeWord(InlineT.Word32.toLarge w), cs')
85                  (* end case *))                  (* end case *))
86            in            in
87              scan              scan

Legend:
Removed from v.5252  
changed lines
  Added in v.5253

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0