/[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 2456 by jyh, Sat Sep 5 22:31:37 1998 UTC revision 2494 by jyh, Tue Oct 13 01:14:08 1998 UTC
# Line 1  Line 1 
1  (*  (*
2   * This file is part of Nuprl-Light, a modular, higher order   * This file is part of MetaPRL, a modular, higher order
3   * logical framework that provides a logical programming   * logical framework that provides a logical programming
4   * environment for OCaml and other languages.   * environment for OCaml and other languages.
5   *   *
# Line 26  Line 26 
26   *)   *)
27    
28  open Printf  open Printf
29  open Nl_debug  open Mp_debug
30    
31  open Refiner.Refiner.Term  open Refiner.Refiner.Term
32  open Refiner.Refiner.TermType  open Refiner.Refiner.TermType
33  open Opname  open Opname
34  open Nl_num  open Mp_num
35    
36  let _ =  let _ =
37     if !debug_load then     if !debug_load then
# Line 43  Line 43 
43    
44  let make_bool_parameter b =  let make_bool_parameter b =
45    make_param (ParamList    make_param (ParamList
46                  [(make_param (Token "bool")); (make_param (Number (Nl_num.Int (if b then 1 else 0))))])                  [(make_param (Token "bool")); (make_param (Number (Mp_num.Int (if b then 1 else 0))))])
47    
48  let make_time_parameter time =  let make_time_parameter time =
49    make_param (ParamList    make_param (ParamList
# Line 64  Line 64 
64    match (dest_param p) with    match (dest_param p) with
65      ParamList [h; v] -> (match (dest_param h) with      ParamList [h; v] -> (match (dest_param h) with
66        Token s -> if s = "bool" then (match (dest_param v) with        Token s -> if s = "bool" then (match (dest_param v) with
67          Number (Nl_num.Int i) -> (i = 1) or (i = 0)          Number (Mp_num.Int i) -> (i = 1) or (i = 0)
68        | _ -> false) else false        | _ -> false) else false
69      | _ -> false)      | _ -> false)
70    | _ -> false    | _ -> false
# Line 84  Line 84 
84    match (dest_param p) with    match (dest_param p) with
85      ParamList [h; v] -> (match (dest_param h) with      ParamList [h; v] -> (match (dest_param h) with
86        Token s -> if s = "bool" then (match (dest_param v) with        Token s -> if s = "bool" then (match (dest_param v) with
87          Number (Nl_num.Int i) -> i = 1          Number (Mp_num.Int i) -> i = 1
88        | _ -> raise (Invalid_argument "destruct_bool_parameter"))        | _ -> raise (Invalid_argument "destruct_bool_parameter"))
89        else raise (Invalid_argument "destruct_bool_parameter")        else raise (Invalid_argument "destruct_bool_parameter")
90      | _ -> raise (Invalid_argument "destruct_bool_parameter"))      | _ -> raise (Invalid_argument "destruct_bool_parameter"))

Legend:
Removed from v.2456  
changed lines
  Added in v.2494

  ViewVC Help
Powered by ViewVC 1.1.26