VSL - The pervasive Structure

# Copyright 2011  Petter Urkedal
#
# This file is part of the Viz Standard Library <http://www.vizlang.org/>.
#
# The Viz Standard Library (VSL) is free software: you can redistribute it
# and/or modify it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# The VSL 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 Lesser General Public License for
# more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with the VSL.  If not, see <http://www.gnu.org/licenses/>.

val ident : α  α
 ## The identity function, (ident x ≡ x), also known as the I combinator.

val konst : α  β  α
 ## (konst x y ≡ x).  (konst) is also known as the K combinator.

val 2'∘ : (β  γ)  (α  β)  α  γ
 ## Function composition, ((f ∘ g) x ≡ f (g x)).

val 2'*> : (α  β)  (β  γ)  α  γ
 ## Function composition with arguments reversed.

val 2'<| : (α  β)  α  β
 ## (f <| x ≡ f x) is the value of (f) at (x).  I.e. (<|) is a low-precedence
 ## variant of the application operator.  It can be pronounced "at" or "of".

val 2'|> : α  (α  β)  β
 ## (x |> f ≡ f x) is the image of (x) under (f).  I.e. (|>) is a reversed
 ## low-precedence application operator.  It can be pronounced "under".

# This is the analog of prelude.ubiquitous for client code.
#?ffoc include compat.ocaml_prereq
#?ffoc include compat.ocaml_unicode.pervasive
#?ffoc include compat.ocaml_miscints.pervasive
#?ffoc include compat.ocaml_pervasives.pervasive
include prelude.prereq.basics
include prelude.prereq.combinators
include prelude.prereq.bool_ops
include prelude.numeric.pervasive
include prelude.numeric.pervasive.int.ops
include prelude.numeric.pervasive.float.ops

in effect include prelude.prereq.effect

val print : string  io unit
val eprint : string  io unit
let __builtin_toplevel_run be prelude.ubiquitous.__builtin_toplevel_run

in bool include data.bool
in char include data.char
in string include data.string

in option include data.option
in list include data.list
in array include data.array
in map.(I : a_total_order) include data.AA_map.make.(I)
in set.(E : a_total_order) include data.AA_set.make.(E)