/[mojave]/metaprl/library/nuprl5.ml
ViewVC logotype

Diff of /metaprl/library/nuprl5.ml

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

revision 2105 by lolorigo, Tue Apr 7 18:08:03 1998 UTC revision 2149 by eaton, Wed Apr 22 18:25:10 1998 UTC
# Line 1  Line 1 
1  open Term  open Term
2  open Opname  open Opname
3  open Int32  open Num
   
4    
5  let nuprl5_opname = mk_opname "!nuprl5_implementation!" nil_opname  let nuprl5_opname = mk_opname "!nuprl5_implementation!" nil_opname
6    
# Line 10  Line 9 
9  let make_bool_parameter b =  let make_bool_parameter b =
10    make_param (ParmList    make_param (ParmList
11                  [(make_param (Token "bool")); (make_param (Number (Num.Int (if b then 1 else 0))))])                  [(make_param (Token "bool")); (make_param (Number (Num.Int (if b then 1 else 0))))])
12    
13  let make_time_parameter time =  let make_time_parameter time =
   let (a, b) = dest_int32 time in  
14    make_param (ParmList    make_param (ParmList
15                  [(make_param (Token "time")); (make_param (Number (Num.Int a))); (make_param (Number (Num.Int b)))])                  [(make_param (Token "time")); (make_param (Number time))])
16    
17  let time_parameter_p p =  let time_parameter_p p =
18    match (dest_param p) with    match (dest_param p) with
# Line 37  Line 36 
36    
37  let destruct_time_parameter p =  let destruct_time_parameter p =
38    match (dest_param p) with    match (dest_param p) with
39      ParmList [h; a; b] -> (match (dest_param h) with      ParmList [h; n] -> (match (dest_param h) with
40        Token s -> if s = "time" then (match (dest_param a) with        Token s -> (if s = "time" then (match (dest_param n) with
41          Number (Num.Int i) -> (match (dest_param b) with          Number i -> i
42            Number (Num.Int k) -> make_int32 (i, k)        | _ -> raise (Invalid_argument "destruct_time_parameter_b"))
43          | _ -> raise (Invalid_argument "destruct_time_parameter"))        else raise (Invalid_argument "destruct_time_parameter_c"))
44        | _ -> raise (Invalid_argument "destruct_time_parameter"))      | _ -> raise (Invalid_argument "destruct_time_parameter_d"))
45        else raise (Invalid_argument "destruct_time_parameter")    | _ -> raise (Invalid_argument "destruct_time_parameter_e")
46      | _ -> raise (Invalid_argument "destruct_time_parameter"))  
   | _ -> raise (Invalid_argument "destruct_time_parameter")  
47    
48  let destruct_bool_parameter p =  let destruct_bool_parameter p =
49    match (dest_param p) with    match (dest_param p) with

Legend:
Removed from v.2105  
changed lines
  Added in v.2149

  ViewVC Help
Powered by ViewVC 1.1.26