Module Stdlib.Pervasives

Contents

Instructions: Use this module in your project

In the IDE (CLion, Visual Studio Code, Xcode, etc.) you use for your DkSDK project:

  1. Add the following to your project's dependencies/CMakeLists.txt:

    Copy
    DkSDKProject_DeclareAvailable(ocaml
        CONSTRAINT "= 4.14.0"
        FINDLIBS str unix runtime_events threads dynlink)
    DkSDKProject_MakeAvailable(ocaml)
  2. Add the Findlib::ocaml library to any desired targets in src/*/CMakeLists.txt:

    Copy
    target_link_libraries(YourPackage_YourLibraryName
         # ... existing libraries, if any ...
         Findlib::ocaml)
  3. Click your IDE's Build button

Not using DkSDK?

FIRST, do one or all of the following:

  1. Run:

    Copy
    opam install ocaml.4.14.0
  2. Edit your dune-project and add:

    Copy
    (package
      (name YourExistingPackage)
      (depends
      ; ... existing dependenices ...
      (ocaml (>= 4.14.0))))

    Then run:

    Copy
    dune build *.opam # if this fails, run: dune build
  3. Edit your <package>.opam file and add:

    Copy
    depends: [
      # ... existing dependencies ...
      "ocaml" {>= "4.14.0"}
    ]

    Then run:

    Copy
    opam install . --deps-only

FINALLY, add the library to any desired (library)and/or (executable) targets in your **/dune files:

Copy
(library
  (name YourLibrary)
  ; ... existing library options ...
  (libraries
    ; ... existing libraries ...
    ))

(executable
  (name YourExecutable)
  ; ... existing executable options ...
  (libraries
    ; ... existing libraries ...
    ))
valraise : ``exn-> 'a
valraise_notrace : ``exn-> 'a
valinvalid_arg : ``string-> 'a
valfailwith : ``string-> 'a
exception Exit
val(=) :'a -> 'a -> bool
val(<>) :'a -> 'a -> bool
val(<) :'a -> 'a -> bool
val(>) :'a -> 'a -> bool
val(<=) :'a -> 'a -> bool
val(>=) :'a -> 'a -> bool
valcompare :'a -> 'a -> int
valmin :'a -> 'a -> 'a
valmax :'a -> 'a -> 'a
val(==) :'a -> 'a -> bool
val(!=) :'a -> 'a -> bool
valnot : ``bool-> bool
val(&&) : ``bool->``bool-> bool
val(&) : ``bool->``bool-> bool
  • deprecated Use (&&) instead.
val(||) : ``bool->``bool-> bool
valor : ``bool->``bool-> bool
  • deprecated Use (||) instead.
val __LOC__ : string
val __FILE__ : string
val __LINE__ : int
val __MODULE__ : string
val __POS__ : string * int * int * int
val__LOC_OF__ :'a ->string *'a
val__LINE_OF__ :'a ->int *'a
val__POS_OF__ :'a ->``(string * int * int * int)`` *'a
val(|>) :'a -> ``('a -> 'b)`` -> 'b
val (@@) : ``('a -> 'b)`` -> 'a -> 'b
val(~-) : ``int-> int
val(~+) : ``int-> int
valsucc : ``int-> int
valpred : ``int-> int
val(+) : ``int->``int-> int
val(-) : ``int->``int-> int
val(*) : ``int->``int-> int
val(/) : ``int->``int-> int
val(mod) : ``int->``int-> int
valabs : ``int-> int
val max_int : int
val min_int : int
val(land) : ``int->``int-> int
val(lor) : ``int->``int-> int
val(lxor) : ``int->``int-> int
vallnot : ``int-> int
val(lsl) : ``int->``int-> int
val(lsr) : ``int->``int-> int
val(asr) : ``int->``int-> int
val(~-.) : ``float-> float
val(~+.) : ``float-> float
val(+.) : ``float->``float-> float
val(-.) : ``float->``float-> float
val(*.) : ``float->``float-> float
val(/.) : ``float->``float-> float
val(**) : ``float->``float-> float
valsqrt : ``float-> float
valexp : ``float-> float
vallog : ``float-> float
vallog10 : ``float-> float
valexpm1 : ``float-> float
vallog1p : ``float-> float
valcos : ``float-> float
valsin : ``float-> float
valtan : ``float-> float
valacos : ``float-> float
valasin : ``float-> float
valatan : ``float-> float
valatan2 : ``float->``float-> float
valhypot : ``float->``float-> float
valcosh : ``float-> float
valsinh : ``float-> float
valtanh : ``float-> float
valceil : ``float-> float
valfloor : ``float-> float
valabs_float : ``float-> float
valcopysign : ``float->``float-> float
valmod_float : ``float->``float-> float
valfrexp : ``float-> float * int
valldexp : ``float->``int-> float
valmodf : ``float-> float * float
valfloat : ``int-> float
valfloat_of_int : ``int-> float
valtruncate : ``float-> int
valint_of_float : ``float-> int
val infinity : float
val neg_infinity : float
val nan : float
val max_float : float
val min_float : float
val epsilon_float : float
type nonrecfpclass`` =fpclass=
| FP_normal
| FP_subnormal
| FP_zero
| FP_infinite
| FP_nan
valclassify_float : ``float-> fpclass
val(^) : ``string->``string-> string
valint_of_char : ``char-> int
valchar_of_int : ``int-> char
valignore :'a -> unit
valstring_of_bool : ``bool-> string
valbool_of_string : ``string-> bool
valbool_of_string_opt : ``string-> ``bool option
valstring_of_int : ``int-> string
valint_of_string : ``string-> int
valint_of_string_opt : ``string-> ``int option
valstring_of_float : ``float-> string
valfloat_of_string : ``string-> float
valfloat_of_string_opt : ``string-> ``float option
val fst : ``('a*'b)`` -> 'a
val snd : ``('a*'b)`` -> 'b
val(@) :'alist``-> 'alist``-> 'a list
type nonrecin_channel`` =in_channel
type nonrecout_channel`` =out_channel
valstdin :in_channel
valstdout :out_channel
valstderr :out_channel
valprint_char : ``char-> unit
valprint_string : ``string-> unit
valprint_bytes : ``bytes-> unit
valprint_int : ``int-> unit
valprint_float : ``float-> unit
valprint_endline : ``string-> unit
valprint_newline : ``unit-> unit
valprerr_char : ``char-> unit
valprerr_string : ``string-> unit
valprerr_bytes : ``bytes-> unit
valprerr_int : ``int-> unit
valprerr_float : ``float-> unit
valprerr_endline : ``string-> unit
valprerr_newline : ``unit-> unit
valread_line : ``unit-> string
valread_int : ``unit-> int
valread_int_opt : ``unit-> ``int option
valread_float : ``unit-> float
valread_float_opt : ``unit-> ``float option
type nonrecopen_flag`` =open_flag=
| Open_rdonly
| Open_wronly
| Open_append
| Open_creat
| Open_trunc
| Open_excl
| Open_binary
| Open_text
| Open_nonblock
valopen_out : ``string-> out_channel
valopen_out_bin : ``string-> out_channel
valopen_out_gen :open_flaglist``->``int->``string-> out_channel
valflush :out_channel -> unit
valflush_all : ``unit-> unit
valoutput_char :out_channel ->``char-> unit
valoutput_string :out_channel ->``string-> unit
valoutput_bytes :out_channel ->``bytes-> unit
valoutput :out_channel ->``bytes->``int->``int-> unit
valoutput_substring :out_channel ->``string->``int->``int-> unit
valoutput_byte :out_channel ->``int-> unit
valoutput_binary_int :out_channel ->``int-> unit
valoutput_value :out_channel -> 'a -> unit
valseek_out :out_channel ->``int-> unit
valpos_out :out_channel -> int
valout_channel_length :out_channel -> int
valclose_out :out_channel -> unit
valclose_out_noerr :out_channel -> unit
valset_binary_mode_out :out_channel ->``bool-> unit
valopen_in : ``string-> in_channel
valopen_in_bin : ``string-> in_channel
valopen_in_gen :open_flaglist``->``int->``string-> in_channel
valinput_char :in_channel -> char
valinput_line :in_channel -> string
valinput :in_channel ->``bytes->``int->``int-> int
valreally_input :in_channel ->``bytes->``int->``int-> unit
valreally_input_string :in_channel ->``int-> string
valinput_byte :in_channel -> int
valinput_binary_int :in_channel -> int
valinput_value :in_channel -> 'a
valseek_in :in_channel ->``int-> unit
valpos_in :in_channel -> int
valin_channel_length :in_channel -> int
valclose_in :in_channel -> unit
valclose_in_noerr :in_channel -> unit
valset_binary_mode_in :in_channel ->``bool-> unit
moduleLargeFile`` =LargeFile
type nonrec``'a ref`` ='a ref = ``{
mutablecontents :'a;}
valref :'a -> 'a ref
val(!) :'a ref -> 'a
val(:=) :'a ref -> 'a -> unit
valincr : ``intref -> unit
valdecr : ``intref -> unit
type nonrec ``('a, 'b) result`` = ``('a, 'b)`` result=
| Ok of 'a
| Error of 'b
type ``('a, 'b, 'c, 'd, 'e, 'f) format6`` = ``('a, 'b, 'c, 'd, 'e, 'f)`` CamlinternalFormatBasics.format6
type ``('a, 'b, 'c, 'd) format4`` = ``('a, 'b, 'c, 'c, 'c, 'd)`` format6
type ``('a, 'b, 'c) format`` = ``('a, 'b, 'c, 'c)`` format4
val string_of_format : ``('a, 'b, 'c, 'd, 'e, 'f)`` format6 -> string
val format_of_string : ``('a, 'b, 'c, 'd, 'e, 'f)`` format6 -> ``('a, 'b, 'c, 'd, 'e, 'f)`` format6
val (^^) : ``('a, 'b, 'c, 'd, 'e, 'f)`` format6 -> ``('f, 'b, 'c, 'e, 'g, 'h)`` format6 -> ``('a, 'b, 'c, 'd, 'g, 'h)`` format6
valexit : ``int-> 'a
valat_exit : ``(``unit->unit)``-> unit
valvalid_float_lexem : ``string-> string
valdo_at_exit : ``unit-> unit

More from the DkSDK Book

    1. DkSDK
      1. Package capnp
        1. Module Capnp
            1. Module type MessageSig.MESSAGE
            1. Module type MessageSig.S
              1. Module S.ListStorage
              1. Module S.Message
              1. Module S.Object
              1. Module S.Segment
              1. Module S.Slice
              1. Module S.StructStorage
            1. Module type MessageSig.SEGMENT
            1. Module type MessageSig.SLICE
        1. Module Capnp_unix
      1. Package cmdliner
        1. Module Cmdliner
        1. Module Cmdliner_arg
        1. Module Cmdliner_base
        1. Module Cmdliner_cline
        1. Module Cmdliner_cmd
        1. Module Cmdliner_docgen
        1. Module Cmdliner_eval
        1. Module Cmdliner_info
        1. Module Cmdliner_manpage
        1. Module Cmdliner_msg
        1. Module Cmdliner_term
        1. Module Cmdliner_term_deprecated
        1. Module Cmdliner_trie
      1. Package fmt
        1. Module Fmt
        1. Module Fmt_cli
        1. Module Fmt_tty
      1. Package logs
        1. Module Logs
          1. Module type Logs.LOG
          1. ...
        1. Module Logs_cli
        1. Module Logs_fmt
        1. Module Logs_lwt
          1. Module type Logs_lwt.LOG
        1. Module Logs_threaded
      1. Package lwt
        1. Module Lwt
        1. Module Lwt_bytes
        1. Module Lwt_condition
        1. Module Lwt_config
        1. Module Lwt_engine
        1. Module Lwt_features
        1. Module Lwt_fmt
        1. Module Lwt_gc
        1. Module Lwt_io
            1. Module type Lwt_io.NumberIO
        1. Module Lwt_list
        1. Module Lwt_main
            1. Module type Lwt_main.Hooks
        1. Module Lwt_mutex
        1. Module Lwt_mvar
        1. Module Lwt_pool
        1. Module Lwt_pqueue
            1. Module type Lwt_pqueue.OrderedType
            1. Module type Lwt_pqueue.S
        1. Module Lwt_preemptive
        1. Module Lwt_process
        1. Module Lwt_result
        1. Module Lwt_seq
        1. Module Lwt_sequence
        1. Module Lwt_stream
        1. Module Lwt_switch
        1. Module Lwt_sys
        1. Module Lwt_throttle
            1. Module type Lwt_throttle.S
        1. Module Lwt_timeout
        1. Module Lwt_unix
      1. Package mtime
        1. Module Mtime
        1. Module Mtime_clock
      1. Package ocaml
        1. Module Bigarray
        1. Module Condition
        1. Module Dynlink
        1. Module Event
        1. Module Mutex
        1. Module Profiling
        1. Module Semaphore
        1. Module Stdlib
          1. ...
          1. Module Stdlib.Pervasives
        1. Module Str
        1. Module Thread
        1. Module ThreadUnix
        1. Module Topdirs
        1. Module Unix
        1. Module UnixLabels
      1. Package
      1. Package result
        1. Module Result
      1. Package stdint
        1. Module Stdint
            1. Module type Stdint.Int