Advertisement
Guest User

Untitled

a guest
Jan 15th, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.79 KB | None | 0 0
  1. let set_end lab coord =
  2.   let (i,j) = coord in
  3.   let (signal, set) = lab.(i).(j) in
  4.   let v = S.value signal in
  5.   set {v with finish = true }
  6.  
  7. let empty_lab n m finish =
  8.   let lab =
  9.     Array.init n
  10.            (fun _ ->
  11.         Array.init m
  12.                (fun _ ->
  13.                 let tmp : 'a React.signal * ( case -> unit) =
  14.                   React.S.create
  15.                 {visited=false;
  16.                  beginning=false;
  17.                  finish=false;
  18.                  borders=Array.make 4 false;} in
  19.                 tmp ))
  20.   in
  21.   set_end lab finish; (* <==== ERROR HERE *)
  22.   lab
  23.  
  24.  
  25. Error: This expression has type
  26.          case React.signal * (?step:React.step -> case -> unit)
  27.        but an expression was expected of type
  28.          case React.signal * (case -> unit)
  29.        Type ?step:React.step -> case -> unit is not compatible with type
  30.          case -> unit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement