Skip to content
This repository
branch: norman_postgres
Fetching contributors…

Cannot retrieve contributors at this time

file 128 lines (113 sloc) 6.339 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
(*
Copyright © 2011, 2012 MLstate

This file is part of Opa.

Opa is free software: you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License, version 3, as published by
the Free Software Foundation.

Opa is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
more details.

You should have received a copy of the GNU Affero General Public License
along with Opa. If not, see <http://www.gnu.org/licenses/>.
*)
open SurfaceAst

(**)

module Remove :
  sig
    type ('a,'b) through
    module Basic :
      sig
        val access_directive:('a, [< all_directives > `private_ `package `public ]) through
        val access_not_public:('a, [< all_directives > `private_ `package `public ]) through
        val async : ('a, [< all_directives > `async ]) through
        val binding_directive:('a, [> binding_directive ]) through
        val coerce : ('a, [< all_directives > `coerce ]) through
        val deprecated : ('a, [< all_directives > `deprecated ]) through
        val directive : ('a, 'b) through
        val doctype : ('a, [< all_directives > `doctype ]) through
        val expand : ('a, [< all_directives > `expand ]) through
        val magic_directive : ('a, [> magic_directive]) through
        val lambda : ('a, 'b) through
        val letin : ('a, 'b) through
        val opacapi : ('a, [< all_directives > `opacapi ]) through
        val opavalue_directive : ('a, [> opavalue_directive]) through
        val open_ : ('a, [< all_directives > `open_ ]) through
        val private_ : ('a, [< all_directives > `private_ ]) through
        val slicer_directive:('a, [< all_directives > `side_annotation `visibility_annotation ]) through
        val side_annotation :('a, [< all_directives > `side_annotation ]) through
        val visibility_annotation:('a, [< all_directives > `visibility_annotation ]) through
      end
    val remove : through:('a, [< all_directives ] as 'b) through list -> ('a, 'b) expr -> ('a, 'b) expr
    val coerce : ('a, [< all_directives > `coerce] as 'b) expr -> ('a, 'b) expr
  end


module Look :
  sig
    type ('a,'b) through = ('a,'b) Remove.through
    val apply : ?through:('a,'b) through list -> ('a, 'b) expr -> bool
    val lambda : ?through:('a,'b) through list -> ('a, 'b) expr -> bool
    val record : ?through:('a,'b) through list -> ('a, 'b) expr -> bool
    val module_ : ?through:('a, [< all_directives > `module_ ] as 'b) through list -> ('a, 'b) expr -> bool
    val module_local :?through:('a, [< all_directives > `module_ `local ] as 'b) through list -> ('a, 'b) expr -> bool
    val private_ : ?through:('a, [< all_directives > `private_ ] as 'b) through list -> ('a, 'b) expr -> bool

    val at : ?through:('a,'b) through list -> at:('a,'b) through list -> ('a, 'b) expr -> bool
    (** [at ~through:patterns ~at:patterns e] returns true when [e] matches one of the patterns of [at]
(while ignoring [through])
*)
  end

(* should be renamed GetThrough *)
module FoldThrough :
  sig
    val dot : ?through:('a, 'b) Remove.through list -> ('a, 'b) expr -> ('a, 'b) expr * (string * QmlLoc.annot) list
    val arity : ?through:('a, 'b) Remove.through list -> ('a, 'b) expr -> int option
    val fields : ?through:('a, ([> `module_ ] as 'b)) Remove.through list -> ('a, 'b) expr -> ('a, 'b) record_node option
    (** gets the fields of records or modules *)
  end


module Context :
  sig
    type ('ident,'input,'output) through_with_context
    module Basic :
      sig
        val coerce : ('a, [< all_directives > `coerce ], [< all_directives > `coerce ]) through_with_context
        val directive : ('a,'b,'b) through_with_context
        val letin : ('a,'b,'b) through_with_context
        val opacapi : ('a,[< all_directives > `opacapi ] as 'b,'b) through_with_context
        val opavalue_directive :
          ('a, [> opavalue_directive ] as 'b, 'b) through_with_context
        val open_ : ('a,[< all_directives > `open_ ] as 'b,'b) through_with_context
        val doctype : ('a, [< all_directives > `doctype ] as 'b, 'b) through_with_context
        val slicer_directive :
          ('a, [< all_directives > `side_annotation `visibility_annotation] as 'b, 'b)
          through_with_context
        val binding_directive: ('a, [> binding_directive] as 'b, 'b) through_with_context
        val side_annotation :
          ('a, [< all_directives > `side_annotation] as 'b, 'b)
          through_with_context
        val visibility_annotation :
          ('a, [< all_directives > `visibility_annotation] as 'b, 'b)
          through_with_context

      end
    val remove : through:('ident, 'input, 'output) through_with_context list ->
           ('ident, 'input) expr ->
           ('ident, 'input) expr * (('ident, 'output) expr -> ('ident, 'output) expr)
    val filter : keep:('ident, 'input, 'output) through_with_context list ->
                 throw:('ident,'input) Remove.through list ->
                 ('ident, 'input) expr ->
                 ('ident, 'input) expr * (('ident, 'output) expr -> ('ident, 'output) expr)
    val filter2 : keep1:('ident, 'input, 'output) through_with_context list ->
                  keep2:('ident, 'input, 'output2) through_with_context list ->
                  throw:('ident,'input) Remove.through list ->
                  ('ident, 'input) expr ->
                  ('ident, 'input) expr *
                    (('ident, 'output) expr -> ('ident, 'output) expr) *
                    (('ident, 'output2) expr -> ('ident, 'output2) expr)
    val uncoerce : ('a,[< all_directives > `coerce] as 'b) expr ->
                   ('a, 'b) expr * (('a, [< all_directives > `coerce ] as 'c) expr -> ('a, 'c) expr)
    val unletin : ('a,'b) expr ->
                   ('a,'b) expr * (('a,'b) expr -> ('a,'b) expr)
  end


module FoldContext :
  sig
    val letin : ?through:('a,'b,'c) Context.through_with_context list ->
         ('a, 'b) expr -> ('a, 'b) expr * ('a * ('a, 'b) expr) list * (('a,'c) expr -> ('a,'c) expr)
  end
Something went wrong with that request. Please try again.