ocaml

ocaml 5.5.1

OCaml is an industrial-strength programming language supporting functional, imperative and object-oriented styles

<rendered-html><p>OCaml is a general purpose programming language with an emphasis on expressiveness and safety. Developed for more than 20 years at Inria by a group of leading researchers, it has an advanced type system that helps catch your mistakes without getting in your way. It’s used in environments where a single mistake can cost millions and speed matters, is supported by an active community, and has a rich set of libraries and development tools. It’s widely used in teaching for its power and simplicity.</p> <p>Strengths:</p> <ul> <li>A powerful type system, equipped with parametric polymorphism and type inference. For instance, the type of a collection can be parameterized by the type of its elements. This allows defining some operations over a collection independently of the type of its elements: sorting an array is one example. Furthermore, type inference allows defining such operations without having to explicitly provide the type of their parameters and result.</li> <li>User-definable algebraic data types and pattern-matching. New algebraic data types can be defined as combinations of records and sums. Functions that operate over such data structures can then be defined by pattern matching, a generalized form of the well-known switch statement, which offers a clean and elegant way of simultaneously examining and naming data.</li> <li>Automatic memory management, thanks to a fast, unobtrusive, incremental garbage collector.</li> <li>Separate compilation of standalone applications. Portable bytecode compilers allow creating stand-alone applications out of Caml Light or OCaml programs. A foreign function interface allows OCaml code to interoperate with C code when necessary. Interactive use of OCaml is also supported via a “read-evaluate-print” loop.</li> </ul> <p>In addition, OCaml features:</p> <ul> <li>A sophisticated module system, which allows organizing modules hierarchically and parameterizing a module over a number of other modules.</li> <li>An expressive object-oriented layer, featuring multiple inheritance, parametric and virtual classes.</li> <li>Efficient native code compilers. In addition to its bytecode compiler, OCaml offers a compiler that produces efficient machine code for many architectures.</li> </ul> <p>Learn more at: <a href="https://ocaml.org/learn/description.html">https://ocaml.org/learn/description.html</a></p> </rendered-html>

https://ocaml.org/
GNU Lesser General Public License v2.1
programs: ocamlrund, ocamldep.opt, ocamlopt, ocamlopt.byte, ocamlc.opt, ocamldoc.opt, ocamlcmt, ocamllex, ocamlruni-a104, ocamlmklib, ocamlprof, aarch64-unknown-linux-gnu-ocamlruni-a104, x86_64-unknown-linux-gnu-ocamlruni-a104, ocamlrund-a104, ocamlmktop, ocamlobjinfo, ocamlobjinfo.byte, ocamlruni, ocamlc, ocamldep.byte, ocaml, ocamlrun-a104, x86_64-unknown-linux-gnu-ocamlrun-a104, ocamldebug, ocamlobjinfo.opt, ocamlcp, ocamlrun, ocamlyacc, ocamldep, ocamllex.opt, ocamldoc, ocamlc.byte, x86_64-unknown-linux-gnu-ocamlrund-a104, aarch64-unknown-linux-gnu-ocamlrund-a104, aarch64-unknown-linux-gnu-ocamlrun-a104, ocamloptp, ocamllex.byte, ocamlopt.opt
Platforms (25)
s390x-linuxmips64-linuxmicroblazeel-linuxmips64el-linuxriscv64-linuxarmv5tel-linuxx86_64-linuxarmv7a-linux
View source on NixOS/nixpkgs →

Install

Copy into your configuration

NixOS (configuration.nix)
environment.systemPackages = with pkgs; [
  ocaml
];
Ad-hoc shell
nix-shell -p ocaml
Flake (nix run)
nix run nixpkgs#ocaml