Library
Module
Module type
Parameter
Class
Class type
Utilities
This module contains several utilities, in particular for debug logs.
val printd : int -> ('a, unit, string, unit) format4 -> 'a
For instance printd debug_warning "The value x=%u is too big" x
will print a message in the console only if the debug
variable contains the debug_warning
flag.
val debug : bool ref
val debug_code : int ref
Logical ored of !debug
with debug flags (below) controls the amount of debuging.
val go : 'a Tsdl.Sdl.result -> 'a
Transform a result
into a standard value, or fail with an error. Used only for SDL functions.
Monadic style operations on optional variables.
default o v
is the same as Option.value o ~default:v
. Warning: v
is evaluated even if it is not used.
Like Option.get
. Warning: remove_option None
will raise the None_option
exception.