Skip to content
Browse files

[cleanup] opacapi,{list,xhtml}.opa: respect opacapi guidelines

  • Loading branch information...
1 parent f146f26 commit eafacd58a84a163525d2e9c718b966480adc0f1b @OpaOnWindowsNow OpaOnWindowsNow committed Jun 22, 2011
Showing with 18 additions and 14 deletions.
  1. +8 −4 opacapi/opacapi.ml
  2. +2 −2 passes/surfaceAstXmlPattern.ml
  3. +2 −2 stdlib/core/list.opa
  4. +6 −6 stdlib/core/xhtml/xhtml.opa
View
12 opacapi/opacapi.ml
@@ -107,6 +107,13 @@ struct
let fold = !! "fold"
end
+module List =
+struct
+ let (!!) s = !! ("List_"^s)
+ let split_at_opt = !! "split_at_opt"
+ let split_between = !! "split_between"
+end
+
module Mutable =
struct
let (!!) s = !! ("Mutable_" ^ s)
@@ -208,16 +215,13 @@ end
module Xml =
struct
- (* FIXME: respect guidelines in opa_compiler_interface, Xml_ *)
- let (!!) s = !! ("xml_" ^ s)
+ let (!!) s = !! ("Xml_" ^ s)
let find_attr = !! "find_attr"
let match_number = !! "match_number"
let match_plus = !! "match_plus"
let match_question = !! "match_question"
let match_range = !! "match_range"
let match_star = !! "match_star"
- let split = !! "split"
- let split_between = !! "split_between"
end
(**
View
4 passes/surfaceAstXmlPattern.ml
@@ -145,11 +145,11 @@ let rec process_named_pattern named_pattern l tl acc =
(C.E.match_ !i
[ C.P.tuple_2 (pattern_of_opt name) (C.P.ident tl), acc ])
| Some (Xml_number e,_) ->
- C.E.match_opt (C.E.applys !I.Xml.split [e;!l])
+ C.E.match_opt (C.E.applys !I.List.split_at_opt [e;!l])
(C.P.none (), C.E.none ())
(C.P.some (C.P.tuple_2 (pattern_of_opt name) (C.P.ident tl)), acc)
| Some (Xml_range (e1,e2),_) ->
- C.E.match_opt (C.E.applys !I.Xml.split_between [!l;e1;e2])
+ C.E.match_opt (C.E.applys !I.List.split_between [!l;e1;e2])
(C.P.none (), C.E.none ())
(C.P.some (C.P.tuple_2 (pattern_of_opt name) (C.P.ident tl)), acc)
)
View
4 stdlib/core/list.opa
@@ -1489,5 +1489,5 @@ nil = List.empty
@opacapi
type caml_list('a) = external
-@opacapi xml_split = List.split_at_opt
-@opacapi xml_split_between = List.split_between
+@opacapi List_split_at_opt = List.split_at_opt
+@opacapi List_split_between = List.split_between
View
12 stdlib/core/xhtml/xhtml.opa
@@ -1121,9 +1121,9 @@ Xhtml =
}}
/* Functions used by xml pattern matching */
-@opacapi xml_find_attr = Xml.find_attr
-@opacapi xml_match_star = Xmlns.match_star
-@opacapi xml_match_plus = Xmlns.match_plus
-@opacapi xml_match_question = Xmlns.match_question
-@opacapi xml_match_number = Xmlns.match_exact
-@opacapi xml_match_range = Xmlns.match_range
+@opacapi Xml_find_attr = Xml.find_attr
+@opacapi Xml_match_star = Xmlns.match_star
+@opacapi Xml_match_plus = Xmlns.match_plus
+@opacapi Xml_match_question = Xmlns.match_question
+@opacapi Xml_match_number = Xmlns.match_exact
+@opacapi Xml_match_range = Xmlns.match_range

0 comments on commit eafacd5

Please sign in to comment.
Something went wrong with that request. Please try again.