Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5aa5e282ab
Fetching contributors…

Cannot retrieve contributors at this time

file 106 lines (79 sloc) 4.37 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
(* Jogging is © 2011 Victor Nicollet *)

type ('arg,'ctx) template
type ('arg,'ctx) t = ('arg,'ctx) template

val to_html : ('arg,View.Context.box) t -> 'arg -> I18n.t -> View.Context.box View.t
val to_text : ('arg,View.Context.text) t -> 'arg -> I18n.t -> View.Context.text View.t

module type JS_HTML_TEMPLATE_DEF = sig
  type t
  val source : I18n.language -> string
  val script : I18n.language -> (string * (t -> Json_type.t)) list
  val mapping : I18n.language -> (string * ((t, View.Context.box) template -> (t, View.Context.box) template)) list
end

module type HTML_TEMPLATE_DEF = sig
  type t
  val source : I18n.language -> string
  val mapping : I18n.language -> (string * ((t, View.Context.box) template -> (t, View.Context.box) template)) list
end

module type HTML = sig
  type t
  val template : I18n.language -> (t, View.Context.box) template
  val render : t -> I18n.t -> View.Context.box -> View.Context.box
end

module type TEXT_TEMPLATE_DEF = sig
  type t
  val source : I18n.language -> string
  val mapping : I18n.language -> (string * ((t, View.Context.text) template -> (t, View.Context.text) template)) list
end

module type TEXT = sig
  type t
  val template : I18n.language -> (t, View.Context.text) template
  val render : t -> I18n.t -> View.Context.text -> View.Context.text
end

module type LOADER = sig

  val load : string
    -> string
    -> (string * (('arg,(#View.Context.text as 'ctx)) t -> ('arg,'ctx) t)) list
    -> [< `Text | `Html]
    -> ('arg,'ctx) t

  val jsload : string
    -> string
    -> (string * (('arg,View.Context.box) t -> ('arg,View.Context.box) t)) list
    -> (string * ('arg -> Json_type.t)) list
    -> [< `Text | `Html]
    -> ('arg,View.Context.box) t

  val clear : unit -> unit

  val save : unit -> unit

  module MakeLoader :
    functor (From : sig val from : string end) ->
  sig

    module Html : functor (Def: HTML_TEMPLATE_DEF) -> HTML with type t = Def.t
    module JsHtml : functor (Def:JS_HTML_TEMPLATE_DEF) -> HTML with type t = Def.t
    module Text : functor (Def: TEXT_TEMPLATE_DEF) -> TEXT with type t = Def.t

  end

end


module Loader : functor (Config:CouchDB.DATABASE) -> LOADER

module Mk : sig

  val empty : ('arg,'ctx) t

  val put : string -> ('arg, (#View.Context.text as 'ctx)) t -> ('arg, 'ctx) t
  val esc : ('arg -> string) -> ('arg, (#View.Context.text as 'ctx)) t -> ('arg, 'ctx) t
  val str : ('arg -> string) -> ('arg, (#View.Context.text as 'ctx)) t -> ('arg, 'ctx) t
  val js : JsCode.t -> ('arg, View.Context.box) t -> ('arg, View.Context.box) t
  val code : ('arg -> JsCode.t) -> ('arg, View.Context.box) t -> ('arg, View.Context.box) t
  val text : ('arg -> View.text) -> ('arg, (#View.Context.text as 'ctx)) t -> ('arg, 'ctx) t
  val html : ('arg -> View.html) -> ('arg, View.Context.box) t -> ('arg,View.Context.box) t

  val int : ('arg -> int) -> ('arg, (#View.Context.text as 'ctx)) t -> ('arg, 'ctx) t

  val i18n : I18n.text -> ('arg, (#View.Context.text as 'ctx)) t -> ('arg, 'ctx) t
  val trad : ('arg -> I18n.text) -> ('arg, (#View.Context.text as 'ctx)) t -> ('arg, 'ctx) t

  val iput : (I18n.t -> string) -> ('arg, (#View.Context.text as 'ctx)) t -> ('arg, 'ctx) t
  val iesc : ('arg -> I18n.t -> string) -> ('arg, (#View.Context.text as 'ctx)) t -> ('arg, 'ctx) t
  val istr : ('arg -> I18n.t -> string) -> ('arg, (#View.Context.text as 'ctx)) t -> ('arg, 'ctx) t
  val ijs : (I18n.t -> JsCode.t) -> ('arg, View.Context.box) t -> ('arg, View.Context.box) t
  val icode : ('arg -> I18n.t -> JsCode.t) -> ('arg, View.Context.box) t -> ('arg, View.Context.box) t
  val itext : ('arg -> I18n.t -> View.text) -> ('arg, (#View.Context.text as 'ctx)) t -> ('arg, 'ctx) t
  val ihtml : ('arg -> I18n.t -> View.html) -> ('arg, View.Context.box) t -> ('arg,View.Context.box) t

  val verbatim : (View.html,View.Context.box) t

  val sub : ('arg -> 'arg2) -> ('arg2, 'ctx) t -> ('arg, 'ctx) t -> ('arg, 'ctx) t
  val list : ('arg -> 'arg2 list) -> ('arg2, 'ctx) t -> ('arg, 'ctx) t -> ('arg, 'ctx) t
  val list_or : ('arg -> 'arg2 list) -> ('arg2, 'ctx) t -> ('arg, 'ctx) t -> ('arg, 'ctx) t -> ('arg, 'ctx) t
  val sub_or : ('arg -> 'arg2 option) -> ('arg2, 'ctx) t -> ('arg, 'ctx) t -> ('arg, 'ctx) t -> ('arg, 'ctx) t
    
end
Something went wrong with that request. Please try again.