Commits

camlspotter committed 11d70ec

ignore => void

  • Participants
  • Parent commits b5fc400

Comments (0)

Files changed (5)

File lib/pbase.ml

     | Error err -> error err <?@> pos
 
   let token : Str.elem -> unit t = fun tkn ->
-    ignore (tokenp (fun x -> Str.equal_elem tkn x)) <?>  Str.show_elem tkn
+    void (tokenp (fun x -> Str.equal_elem tkn x)) <?>  Str.show_elem tkn
 
   (* CR jfuruss: optimization oppotunity for char *)     
   let one_of : Str.elem list -> Str.elem t = fun tkns ->

File lib/pbaseexn.ml

     | Error mes -> error mes <?@> pos
 
   let token : Str.elem -> unit t = fun tkn ->
-    ignore (tokenp (fun x -> tkn = x)) <?>  Str.show_elem tkn
+    void (tokenp (fun x -> tkn = x)) <?>  Str.show_elem tkn
 
   let one_of : Str.elem list -> Str.elem t = fun tkns ->
     tokenp (fun x -> List.mem x tkns)

File lib/pbaseref.ml

     | Error mes -> error mes <?@> pos
 
   let token : Str.elem -> unit t = fun tkn ->
-    ignore (tokenp (fun x -> tkn = x)) <?>  Str.show_elem tkn
+    void (tokenp (fun x -> tkn = x)) <?>  Str.show_elem tkn
 
   let one_of : Str.elem list -> Str.elem t = fun tkns ->
     tokenp (fun x -> List.mem x tkns)

File lib/pbuffer.ml

     return s
 
   let ( ??** ) = takeWhile
-  let ( ??* ) p = ignore (takeWhile p)
+  let ( ??* ) p = void (takeWhile p)
 
   let string s =
     position >>= fun pos0 ->

File test/expr.ml

   ]
   
 (* parsing rules *)
-let blank = ignore (one_of [' '; '\t'; '\n'; '\r'])
+let blank = void (one_of [' '; '\t'; '\n'; '\r'])
 
 let combine_leftrec (non_leftrec : 'a Parser.t) (leftrec : 'a -> 'a Parser.t) =