package bogue
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=991bc2e85df38feb23bddf84addd758d
sha512=8b777f7b479946528626c4112bf45600bee9aed0d94742e3eed0659f9a0517e41d0eaf398299920fd5b9f86065bd0e24035662d2df36f24f6a044c78e61dee01
doc/bogue/Bogue/Utils/index.html
Module Bogue.UtilsSource
Utilities.
This module contains several utilities, in particular for debug logs.
Dependency graph
Debugging
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.
Logical ored of !debug with debug flags (below) controls the amount of debuging.
Binary masks (=flags) for debugging messages.
Maths
Round float to nearest integer.
imax a b returns max(a, b). (Same as Int.max).
imin a b returns min(a, b). (Same as Int.min).
Tsdl Result
Transform a result into a standard value, or fail with an error. Used for SDL functions only.
Options
Monadic style operations on optional variables.
map_option o f is the same as Option.map f o.
do_option o f is the same as Option.iter f o.
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.
Others
run f is equivalent to f ().