CINXE.COM
OCaml Releases
<!DOCTYPE html> <html lang="en"> <head id="htmx-head"> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content="The history of OCaml releases with a summary and a complete changelog, as well as the manual at that time."> <meta name="twitter:title" content="OCaml Releases"> <meta name="twitter:description" content="The history of OCaml releases with a summary and a complete changelog, as well as the manual at that time."> <meta name="twitter:image" content="https://ocaml.org/_/MWIyY2ZmMWM5YzdkYWNmYWI4NGQ0MDBjOGFiZTYxOTg/ocaml_org_social_media.png"> <meta property="og:site_name" content="OCaml"> <meta property="og:type" content="object"> <meta property="og:title" content="OCaml Releases"> <meta property="og:description" content="The history of OCaml releases with a summary and a complete changelog, as well as the manual at that time."> <meta name="og:image" content="https://ocaml.org/_/MWIyY2ZmMWM5YzdkYWNmYWI4NGQ0MDBjOGFiZTYxOTg/ocaml_org_social_media.png"> <meta name="theme-color" content="#fff" > <meta name="color-scheme" content="white"> <meta name="ahrefs-site-verification" content="6ff715b377cdcd566334b44ae8888791189ce24640c8a403eacdc3bcbaa9449b"> <link rel="canonical" href="https://ocaml.org/releases"> <link rel="icon" type="image/x-icon" href="/_/ZDJmMjgzN2NkZmJlMzgxNGQxMTMxNGVlMzk1NzZkN2I/favicon.ico"> <link rel="manifest" href="/manifest.json"> <link rel="stylesheet" href="/_/M2QzNTJkMGFlMzUxZDFkZDE4MDdjYzljNThkN2U1YjQ/css/main.css"> <link rel="stylesheet" href="/_/NmFjYjY5ZmIxYWRhMWQxMTQxODM4ZDEwYTgwMDcwNmI/vendors/font-files/inter.css"> <link rel="stylesheet" href="/_/YjM3OGY4YzIwN2E2ZmUxZTczOWVkNDQwZWRhMDU0MGM/vendors/font-files/roboto-mono.css"> <script defer src="/_/OWYyZDQyZjg4MTFlNWEzZjE4ZGY0YWM0OTU1NGEzYTI/vendors/alpine-clipboard.js"></script> <script defer src="/_/NGI1NjQzZjdkODY0MTY2MmViNThhM2VlZTYwMDk3NTI/vendors/alpine.min.js"></script> <script defer src="/_/YTNhODI2Yzg0Yzk4M2ZiNDcxYmRiYzdhY2FiN2Y0OWQ/vendors/htmx.min.js"></script> <script defer data-domain="ocaml.org" src="https://plausible.ci.dev/js/script.js"></script> <link rel="search" href="/opensearch.xml" type="application/opensearchdescription+xml" title="OCaml"> <title>OCaml Releases</title> </head> <body> <script> if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches)) { document.body.classList.add("dark"); } else { document.body.classList.remove("dark"); } </script> <header class="h-20 flex items-center bg-sand dark:bg-dark-background_navigation" x-data="{ open: false }"> <nav class="container-fluid wide header flex justify-between items-center gap-5 xl:gap-8"> <ul class="order-0 space space-x-5 xl:space-x-8 items-center flex text-content font-medium dark:text-title dark:text-opacity-60 dark:font-semibold"> <li style="width:132px"> <a href="/" class="block pb-2"> <img src="/_/MDBjN2M4YjIxY2Y1YWExZWE3Njk4M2FiZTg1NWZjNTM/logo-with-name.svg" width="132" alt="OCaml logo" class="dark:hidden"> <img src="/_/MTE3YWE5YzJlZmExNmYyMmI3ZmEwYjliMDEwNDBkMDY/logo-with-name-white.svg" width="132" alt="OCaml logo" class="hidden dark:inline"> </a> </li> </ul> <ul class="order-2 hidden lg:flex items-center"> <li> <form x-data="{ row: null, col: 0, max: 0, total: 0 }" @submit="if (row !== null) { window.location = document.getElementById('package-autocomplete-'+row+'-'+col).getAttribute('href'); $event.stopPropagation(); $event.preventDefault(); return false }" action="/packages/search" method="GET"> <div class="dropdown-container flex items-center justify-center h-10 rounded-md focus-within:outline-primary_25 dark:focus-within:outline-dark-primary_40 focus-within:outline focus-within:outline-2 lg:w-56 xl:w-80" tabindex="0"> <label for="q" class="sr-only">Search OCaml packages</label> <input type="search" name="q" placeholder="Search OCaml packages" @keydown.escape="$event.target.blur()" class="bg-white dark:bg-dark-card text-title dark:text-dark-title h-full w-full font-normal focus:border-primary dark:focus:border-dark-primary focus:ring-0 border-primary dark:border-dark-primary rounded-md rounded-r-none px-3 py-1 placeholder-text-content dark:placeholder:text-dark-content appearance-none focus:outline-none" @keydown.stop @keyup.down="if (row === null) { row = 0; col = 0; } else { row +=1; if (row > max) { row = max } }" @keyup.up="if (row !== null) { row -=1; if (row < 0) { row = null } }" @keyup.right="if (col < 1) col++" @keyup.left="if (col >= 1) col--" :aria-activedescendant="row !== null ? 'package-autocomplete-'+row+'-'+col : null" hx-get="/packages/autocomplete" hx-params="q" hx-trigger="keyup changed, search" hx-target="#header-search-results" hx-indicator="#header-search-indicator" autocomplete="off" > <button aria-label="search" class="h-full flex items-center justify-center rounded-r-md bg-primary dark:bg-dark-primary text-white dark:text-dark-white px-4" type="submit" ><svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /> </svg> </button> <div class="dropdown w-full lg:w-[32rem] xl:w-[32rem] z-10 absolute rounded-md mt-12 shadow-2xl top-1 p-2 bg-background dark:bg-dark-background shadow-3xl dark:outline dark:outline-1 dark:outline-primary"> <div id="header-search-results" aria-live="polite"></div> <a class="flex py-2 px-2 mx-2 gap-4 hover:bg-primary_nav_block_hover_10 dark:hover:bg-dark-primary_nav_block_hover_10 font-normal rounded-md text-primary dark:text-dark-primary" href="/api"> Standard Library API <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path> </svg> </a> </div> </div> </form> </li> </ul> <ul class="order-1 mr-auto items-center hidden lg:flex font-medium dark:text-white dark:text-opacity-60 dark:font-semibold"> <li><a href="/docs" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-title dark:text-dark-title">Learn</a> </li> <li><a href="/tools" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-primary dark:text-dark-primary underline">Tools</a> </li> <li><a href="/packages" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-title dark:text-dark-title">Packages</a> </li> <li><a href="/community" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-title dark:text-dark-title">Community</a> </li> <li><a href="/changelog" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-title dark:text-dark-title">News</a> </li> <li><a href="/play" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primary text-title dark:text-dark-title">Play</a> </li> </ul> <ul class="order-3 hidden lg:flex items-center"> <li><a href="/docs/get-started" class="border border-primary dark:border-dark-primary text-primary dark:text-dark-primary font-bold py-2.5 px-7 whitespace-nowrap rounded">Get Started</a></li> </ul> <ul class="order-1 lg:hidden flex items-center"> <li class="h-12 w-12 hover:bg-primary_25 dark:hover:bg-primary_20 flex items-center justify-center rounded-full text-content dark:text-dark-title"> <button aria-label="open menu" @click="open = ! open"> <svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 10h16M4 14h16M4 18h16" /> </svg> </button> </li> </ul> </nav> <div class="bg-black fixed w-full h-full left-0 top-0 opacity-60 z-40" x-show='open' x-cloak></div> <nav class="z-50 h-full fixed right-0 top-0 max-w-full w-96 bg-background dark:bg-dark-background shadow-lg" x-show="open" x-cloak @click.away="open = false" x-transition:enter="transition duration-200 ease-out" x-transition:enter-start="translate-x-full" x-transition:leave="transition duration-100 ease-in" x-transition:leave-end="translate-x-full"> <ul class="text-content p-6 font-semibold"> <li class="flex justify-between items-center"> <a href="/"> <img src="/_/MDBjN2M4YjIxY2Y1YWExZWE3Njk4M2FiZTg1NWZjNTM/logo-with-name.svg" width="132" alt="OCaml logo" class="dark:hidden"> <img src="/_/MTE3YWE5YzJlZmExNmYyMmI3ZmEwYjliMDEwNDBkMDY/logo-with-name-white.svg" width="132" alt="OCaml logo" class="hidden dark:inline"> </a> <div class="" x-on:click="open = false"> <button aria-label="close" class="text-content dark:text-dark-title"> <svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" /> </svg> </button> </div> </li> <li class="mt-6 mb-3"> <form action="/packages/search" method="GET"> <div class="dropdown-container flex items-center justify-center h-10 rounded-md focus-within:outline-primary_25 dark:focus-within:outline-dark-primary_40 focus-within:outline focus-within:outline-2 " tabindex="0"> <label for="q" class="sr-only">Search OCaml packages</label> <input type="search" name="q" placeholder="Search OCaml packages" @keydown.escape="$event.target.blur()" class="bg-white dark:bg-dark-card text-title dark:text-dark-title h-full w-full font-normal focus:border-primary dark:focus:border-dark-primary focus:ring-0 border-primary dark:border-dark-primary rounded-md rounded-r-none px-3 py-1 placeholder-text-content dark:placeholder:text-dark-content appearance-none focus:outline-none" > <button aria-label="search" class="h-full flex items-center justify-center rounded-r-md bg-primary dark:bg-dark-primary text-white dark:text-dark-white px-4" type="submit" ><svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /> </svg> </button> </div> </form> </li> <li><a href="/docs" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-title dark:text-dark-title">Learn</a> </li> <li><a href="/tools" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-primary dark:text-dark-primary underline">Tools</a> </li> <li><a href="/packages" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-title dark:text-dark-title">Packages</a> </li> <li><a href="/community" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-title dark:text-dark-title">Community</a> </li> <li><a href="/changelog" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-title dark:text-dark-title">News</a> </li> <li><a href="/play" class="block font-normal py-3 mg:py-4 px-1 lg:px-3 hover:text-primary dark:hover:text-dark-primaryblock text-title dark:text-dark-title">Play</a> </li> <li> <a href="/api" class="flex py-3 px-1 gap-4 font-semibold text-primary dark:text-dark-primary">Standard Library API<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path> </svg> </a> </li> <li class="mt-3 mb-6"> <a href="/docs/get-started" class="w-full rounded font-normal py-3 px-7 flex items-center justify-center bg-primary dark:bg-dark-primary text-white dark:text-dark-title">Get started</a> </li> <li> <div class="space-x-6 text-2xl flex items-center"> <a aria-label="OCaml's Discord" href="https://discord.gg/cCYQbqN" class="opacity-60 hover:opacity-100 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M18.9419 5.29661C17.6473 4.69088 16.263 4.25066 14.8157 4C14.638 4.32134 14.4304 4.75355 14.2872 5.09738C12.7487 4.86601 11.2245 4.86601 9.7143 5.09738C9.57116 4.75355 9.3588 4.32134 9.17947 4C7.73067 4.25066 6.3448 4.6925 5.05016 5.29982C2.43887 9.24582 1.73099 13.0938 2.08493 16.8872C3.81688 18.1805 5.49534 18.9662 7.14548 19.4804C7.55291 18.9196 7.91628 18.3235 8.22931 17.6953C7.63313 17.4688 7.06211 17.1892 6.52256 16.8647C6.6657 16.7586 6.80571 16.6478 6.94098 16.5337C10.2318 18.0729 13.8074 18.0729 17.0589 16.5337C17.1958 16.6478 17.3358 16.7586 17.4774 16.8647C16.9362 17.1908 16.3637 17.4704 15.7675 17.697C16.0805 18.3235 16.4423 18.9212 16.8513 19.4819C18.503 18.9678 20.183 18.1822 21.915 16.8872C22.3303 12.4897 21.2056 8.67705 18.9419 5.29661ZM8.67765 14.5543C7.68977 14.5543 6.87963 13.632 6.87963 12.509C6.87963 11.3859 7.67247 10.4621 8.67765 10.4621C9.68285 10.4621 10.493 11.3843 10.4757 12.509C10.4772 13.632 9.68285 14.5543 8.67765 14.5543ZM15.3223 14.5543C14.3344 14.5543 13.5243 13.632 13.5243 12.509C13.5243 11.3859 14.3171 10.4621 15.3223 10.4621C16.3275 10.4621 17.1376 11.3843 17.1203 12.509C17.1203 13.632 16.3275 14.5543 15.3223 14.5543Z" clip-rule="evenodd" /> </svg> </a> <a aria-label="The OCaml Compiler on GitHub" href="https://github.com/ocaml/ocaml" class="opacity-60 hover:opacity-100 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clip-rule="evenodd" /> </svg> </a> <a aria-label="The OCaml Language Twitter Account" href="https://twitter.com/ocaml_org" class="opacity-60 hover:opacity-100 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" /> </svg> </a> </div> </li> </ul> </nav> </header> <script> window.addEventListener('keydown', function(event) { if (event.key === "/") { event.preventDefault(); document.querySelector("input[type='search']").focus() } }) </script> <main class="bg-background dark:bg-dark-background"><nav aria-label="breadcrumbs" class="px-4 flex bg-title dark:bg-[#111827] text-white dark:text-dark-title md:hidden"> <ul> <li class="inline-block"> <a href="/tools" class="flex items-center px-2 py-2 border-transparent border-2 border-b-4"> Tools <span> <svg xmlns="http://www.w3.org/2000/svg" class="w-3 h-3 ml-2" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" /> </svg> </span> </a> </li> <li class="inline-block"> <select onchange="location = this.value;" class="appearance-none border-2 border-b-4 bg-transparent bg-none font-bold border-none w-auto p-0 m-0 cursor-pointer focus:outline-none focus:ring-0"> <option value="/tools" > Overview </option> <option value="/releases" selected> Compiler Releases </option> </select> <span class="text-primary dark:text-dark-primary cursor-pointer">▾</span> </li> </ul> </nav> <div class="bg-title dark:bg-[#111827] hidden md:flex"> <nav class="container-fluid wide flex flex-wrap"> <a href="/tools" class="justify-start px-4 py-2 text-white dark:text-dark-title items-center font-normal border-2 border-b-4 border-transparent rounded opacity-80 hover:text-primary dark:hover:text-dark-primary"> Overview </a> <a href="/releases" class="justify-start px-4 py-2 text-white dark:text-dark-title items-center font-normal border-2 border-b-4 border-transparent rounded border-b-primary dark:border-b-dark-primary"> Compiler Releases </a> </nav> </div> <div class="bg-background dark:bg-dark-background"> <div class="flex-1 z-0 z- min-w-0 pb-12"> <div class="intro-section-simple dark:dark-intro-section-simple"> <div class="container-fluid"> <div class="w-full m-auto"> <h1 class="font-bold text-title dark:text-dark-title">Releases</h1> <p class="text-content dark:text-dark-content lg:text-lg">The history of OCaml releases with a summary and a complete changelog, as well as the manual at that time.</p> </div> </div> </div> <div class="bg-background dark:bg-dark-background"> <div class="py-10 lg:py-28"> <div class="container-fluid"> <div class="flex justify-between md:items-center flex-col md:flex-row"> <h5 class="font-bold mb-5 md:mb-0 text-title dark:text-dark-title">34 Releases</h5> <form action="/releases" method="GET"> <div class="dropdown-container flex items-center justify-center h-10 rounded-md focus-within:outline-primary_25 dark:focus-within:outline-dark-primary_40 focus-within:outline focus-within:outline-2 " tabindex="0"> <label for="q" class="sr-only">Search for a release</label> <input type="search" name="q" placeholder="Search for a release" @keydown.escape="$event.target.blur()" class="bg-white dark:bg-dark-card text-title dark:text-dark-title h-full w-full font-normal focus:border-primary dark:focus:border-dark-primary focus:ring-0 border-primary dark:border-dark-primary rounded-md rounded-r-none px-3 py-1 placeholder-text-content dark:placeholder:text-dark-content appearance-none focus:outline-none" value="" > <button aria-label="search" class="h-full flex items-center justify-center rounded-r-md bg-primary dark:bg-dark-primary text-white dark:text-dark-white px-4" type="submit" ><svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" /> </svg> </button> </div> </form> </div> <div class="overflow-x-scroll lg:overflow-hidden mt-5 lg:mt-10"> <div class="max-w-5xl lg:max-w-full align-top"> <div class="text-title dark:text-dark-title text-left rounded-xl hidden lg:flex font-bold"> <div class="w-2/3"> <h2 class="py-4 px-6 text-base">Version</h2> </div> <div class="lg:w-1/3 flex"> <h2 class="py-4 px-6 w-1/2 text-base">Date</h2> <h2 class="py-4 px-6 w-1/2 text-base">Actions</h2> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 5.3.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Syntax for deep effect handlers</li> <li>Restored MSVC port</li> <li>Re-introduced statistical memory profiling</li> <li>More space-efficient implementation of Dynarray</li> <li>utf-8 encoded Unicode source files and modest support of Unicode identifiers</li> <li>Improved metadata on the pairs of declarations and definitions for merlin.</li> <li>Around 20 new functions in the standard library</li> <li>Many fixes and improvements in the runtime</li> <li>Improved error messages for first-class modules, functors, labeled arguments, type clashes.</li> <li>Numerous bug fixes</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2025-01-08 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/5.3.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/5.3.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/5.3/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/5.3/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 5.2.1 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Bug fixes for 5.2.0</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2024-11-18 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/5.2.1" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/5.2.1" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/5.2/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/5.2/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 5.2.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Reintroduced GC compaction</li> <li>Restored native backend for POWER 64 bits</li> <li>Thread sanitiser support</li> <li>New Dynarray module</li> <li>New <code>-H</code> flag for hidden include directories</li> <li>Project-wide occurrence metadata support for developer tools</li> <li>Raw identifiers</li> <li>Local open in type expressions</li> <li>Around 20 new functions in the standard library</li> <li>Many fixes and improvements in the runtime</li> <li>Many bug fixes</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2024-05-13 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/5.2.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/5.2.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/5.2/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/5.2/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 5.1.1 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Marshall.Compression flag removed from the standard library</li> <li>Bug fixes for 5.1.0</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2023-12-08 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/5.1.1" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/5.1.1" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/5.1/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/5.1/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 5.1.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Many runtime performance regression and memory-leaks fixes (dynlinking, weak array, weak hash sets, GC with idle domains, GC prefetching)</li> <li>Restored support for native code generation on RISC-V and s390x architectures</li> <li>Restored Cygwin port</li> <li>Reduced installation size (50% reduction)</li> <li>Compressed compilation artefacts (.cmi, .cmt, .cmti, .cmo, .cma files)</li> <li>19 error message improvements</li> <li>14 standard library functions made tail-recursive with Tail-Recursion-Modulo-Cons (TRMC), such as <code>List.append</code> and <code>List.map</code></li> <li>57 new standard library functions</li> <li>More examples in the standard library documentation</li> <li>42 bug fixes</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2023-09-14 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/5.1.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/5.1.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/5.1/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/5.1/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 5.0.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <p>OCaml 5.0.0 introduces a completely new runtime system with support for <a href="https://ocaml.org/releases/5.0/manual/parallelism.html">shared memory parallelism</a> and <a href="https://ocaml.org/releases/5.0/manual/effects.html">effect handlers</a>.</p> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2022-12-16 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/5.0.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/5.0.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/5.0/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/5.0/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.14.2 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Bug fixes for 4.14.1</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2024-03-15 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.14.2" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.14.2" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.14/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.14/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.14.1 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Bug fixes for 4.14.1</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2022-12-20 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.14.1" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.14.1" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.14/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.14/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.14.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <p>Some of the highlights in OCaml 4.14.0 are:</p> <ul> <li>Integrated support for "go to definitions" in Merlin.</li> <li>Standard library: new modules In_channel and Out_channel, many new functions in Seq module, UTF decoding and validation support for strings and bytes.</li> <li>Runtime optimisation: GC prefetching. Benchmarks show a speedup of around 20% in GC-heavy programs.</li> <li>Improved error messages in particular for module-level error.</li> <li>Deprecated functions and modules in preparation for OCaml 5. In particular, the Stream and Genlex modules are now deprecated.</li> <li>Type variables can be explicitly introduced in value and variant constructor declarations. For instance, <pre><code><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>val</span><span class='ocaml-source'> </span><span class='ocaml-source'>fold</span><span class='ocaml-keyword-other-ocaml punctuation-other-colon punctuation'>:</span><span class='ocaml-source'> </span><span class='ocaml-source'>(</span><span class='ocaml-storage-type'>'acc</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-storage-type'>'elt</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-storage-type'>'acc</span><span class='ocaml-source'>)</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-storage-type'>'acc</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-storage-type'>'elt</span><span class='ocaml-source'> </span><span class='ocaml-source'>list</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-storage-type'>'acc</span><span class='ocaml-source'> </span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>type</span><span class='ocaml-source'> </span><span class='ocaml-source'>showable</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>=</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>Show</span><span class='ocaml-keyword-other-ocaml punctuation-other-colon punctuation'>:</span><span class='ocaml-source'> </span><span class='ocaml-storage-type'>'a</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>*</span><span class='ocaml-source'> </span><span class='ocaml-source'>(</span><span class='ocaml-storage-type'>'a</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-support-type'>string</span><span class='ocaml-source'>)</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-source'>showable</span><span class='ocaml-source'> </span></code></pre> can now be written as <pre><code><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>val</span><span class='ocaml-source'> </span><span class='ocaml-source'>fold</span><span class='ocaml-keyword-other-ocaml punctuation-other-colon punctuation'>:</span><span class='ocaml-source'> </span><span class='ocaml-storage-type'>'acc</span><span class='ocaml-source'> </span><span class='ocaml-storage-type'>'elt</span><span class='ocaml-keyword-other-ocaml punctuation-other-period punctuation-separator'>.</span><span class='ocaml-source'> </span><span class='ocaml-source'>(</span><span class='ocaml-storage-type'>'acc</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-storage-type'>'elt</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-storage-type'>'acc</span><span class='ocaml-source'>)</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-storage-type'>'acc</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-storage-type'>'elt</span><span class='ocaml-source'> </span><span class='ocaml-source'>list</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-storage-type'>'acc</span><span class='ocaml-source'> </span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>type</span><span class='ocaml-source'> </span><span class='ocaml-source'>showable</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>=</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>Show</span><span class='ocaml-keyword-other-ocaml punctuation-other-colon punctuation'>:</span><span class='ocaml-source'> </span><span class='ocaml-storage-type'>'a</span><span class='ocaml-keyword-other-ocaml punctuation-other-period punctuation-separator'>.</span><span class='ocaml-source'> </span><span class='ocaml-storage-type'>'a</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>*</span><span class='ocaml-source'> </span><span class='ocaml-source'>(</span><span class='ocaml-storage-type'>'a</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-support-type'>string</span><span class='ocaml-source'>)</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-source'>showable</span><span class='ocaml-source'> </span></code></pre> </li> <li>Tail-call with up to 64 arguments are now guaranteed to be optimized for all architectures.</li> <li>Experimental tail modulo cons (TMC) transformation</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2022-03-28 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.14.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.14.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.14/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.14/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.13.1 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Bug fixes for 4.13.0</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2021-10-01 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.13.1" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.13.1" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.13/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.13/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.13.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Safe points: a multicore prerequisite that ensures that ocamlopt-generated code can always be interrupted.</li> <li>The best-fit GC allocation policy is the now default policy (and many other GCs improvements.</li> <li>Named existential type variables in pattern matching <code>Showable (type a) (x, show : a * (a -> string))</code>.</li> <li>Improved error messages for functor application and functor types.</li> <li>Let-punning for monadic let: <code>let* x = x in</code> can be shortened to <code>let* x in</code>.</li> <li>Module type substitutions <code>SIG with module type T = F(X).S</code>.</li> <li>Many other quality of life improvements</li> <li>Many bug fixes</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2021-09-24 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.13.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.13.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.13/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.13/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.12.1 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Bug fixes for 4.12.0</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2021-02-24 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.12.1" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.12.1" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.12/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.12/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.12.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Major progress in reducing the difference between the mainline and multicore runtime</li> <li>A new configuration option <code>ocaml-option-nnpchecker</code> which emits an alarm when the garbage collector finds out-of-heap pointers that could cause a crash in the multicore runtime</li> <li>Support for macOS/arm64</li> <li>Mnemonic names for warnings</li> <li>Many quality of life improvements</li> <li>Many bug fixes</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2021-02-24 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.12.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.12.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.12/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.12/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.11.2 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Bug fixes for 4.11.1</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2021-02-24 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.11.2" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.11.2" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.11/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.11/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.11.1 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Bug fixes for 4.11.0</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2020-08-31 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.11.1" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.11.1" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.11/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.11/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.11.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Statmemprof: a new statistical memory profiler</li> <li>A new instrumented runtime that logs runtime statistics in a standard format</li> <li>A native backend for the RISC-V architecture</li> <li>Improved backtraces that refer to function names</li> <li>Suppport for recursive and yet unboxed types</li> <li>A quoted extension syntax for ppxs.</li> <li>Many quality of life improvements</li> <li>Many bug fixes.</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2020-08-19 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.11.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.11.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.11/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.11/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.10.2 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Bug fixes for 4.10.1</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2020-12-08 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.10.2" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.10.2" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.10/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.10/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.10.1 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Bug fixes for 4.10.0</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2020-08-20 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.10.1" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.10.1" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.10/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.10/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.10.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>A new best-fit allocator for the major heap which reducing both GC cost an memory usage.</li> <li>Immutable strings are now enforced at configuration time</li> <li>User-defined indexing operators for multidimensional arrays</li> <li>Coming soon: statmemprof, a new statistical memory profiler. The external API will be release next version.</li> <li>Miscellaneous improvements to the manual</li> <li>A more precise exhaustiveness check for GADTs</li> <li>Many bug fixes</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2020-02-21 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.10.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.10.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.10/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.10/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.09.1 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Bug fixes for 4.09.0</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2020-03-16 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.09.1" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.09.1" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.09/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.09/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.09.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>New optimisations, in particular for affine functions in matches, for instance <pre><code><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>type</span><span class='ocaml-source'> </span><span class='ocaml-source'>t</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>=</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>A</span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>|</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>B</span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>|</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>C</span><span class='ocaml-source'> </span><span class='ocaml-source'> </span><span class='ocaml-keyword'>let</span><span class='ocaml-source'> </span><span class='ocaml-entity-name-function-binding'>affine</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>=</span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>function</span><span class='ocaml-source'> </span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>|</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>A</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-constant-numeric-decimal-integer'>4</span><span class='ocaml-source'> </span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>|</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>B</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-constant-numeric-decimal-integer'>3</span><span class='ocaml-source'> </span><span class='ocaml-source'> </span><span class='ocaml-keyword-other'>|</span><span class='ocaml-source'> </span><span class='ocaml-constant-language-capital-identifier'>C</span><span class='ocaml-source'> </span><span class='ocaml-keyword-operator'>-></span><span class='ocaml-source'> </span><span class='ocaml-constant-numeric-decimal-integer'>2</span><span class='ocaml-source'> </span></code></pre> </li> <li>The <code>graphics</code> library was moved out of the compiler distribution.</li> <li>The <code>vmthread</code> library was removed.</li> <li>Support for compiler plugins was removed.</li> <li>Many bug fixes.</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2019-09-18 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.09.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.09.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.09/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.09/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.08.1 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Bug fixes for 4.08.0</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2019-08-05 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.08.1" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.08.1" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.08/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.08/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.08.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Binding operators (<code>let*</code>, <code>let+</code>, <code>and*</code>, etc). They can be used to streamline monadic code.</li> <li><code>open</code> now applies to arbitrary module expression in structures and to applicative paths in signatures.</li> <li>A new notion of (user-defined) "alerts" generalizes the deprecated warning.</li> <li>New modules in the standard library: <code>Fun</code>, <code>Bool</code>, <code>Int</code>, <code>Option</code>, <code>Result</code>.</li> <li>A significant number of new functions in <code>Float</code>, including FMA support, and a new <code>Float.Array</code> submodule.</li> <li>Source highlighting for errors and warnings in batch mode.</li> <li>Many error messages were improved.</li> <li>Improved AFL instrumentation for objects and lazy values.</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2019-06-14 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.08.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.08.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.08/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.08/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.07.1 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Bug fixes for 4.07.0</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2018-10-04 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.07.1" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.07.1" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.07/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.07/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.07.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>The standard library is now packed into a module called <code>Stdlib</code>, which is open by default. This makes it easier to add new modules to the standard library without clashing with user-defined modules.</li> <li>The <code>Bigarray</code> module is now part of the standard library.</li> <li>The modules <code>Seq</code>, <code>Float</code> were added to the standard library.</li> <li>Improvements to several error and warning messages printed by the compiler make them much easier to understand.</li> <li>Many improvements to flambda.</li> <li>Removed the dependency on curses/terminfo/termcap.</li> <li>The SpaceTime profiler now works under Windows.</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2018-07-10 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.07.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.07.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.07/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.07/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.06.1 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Bug fixes for 4.06.0</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2018-02-16 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.06.1" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.06.1" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.06/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.06/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.06.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li> <p>Strings (type <code>string</code>) are now immutable by default. In-place modification must use the type <code>bytes</code> of byte sequences, which is distinct from <code>string</code>. This corresponds to the <code>-safe-string</code> compile-time option, which was introduced in OCaml 4.02 in 2014, and which is now the default.</p> </li> <li> <p>Object types can now extend a previously-defined object type, as in <code><t; a: int></code>.</p> </li> <li> <p>Destructive substitution over module signatures can now express more substitutions, such as <code>S with type M.t := type-expr</code> and <code>S with module M.N := path</code>.</p> </li> <li> <p>Users can now define operators that look like array indexing, e.g. <code>let ( .%() ) = List.nth in [0; 1; 2].%(1)</code></p> </li> <li> <p>New escape <code>\u{XXXX}</code> in string literals, denoting the UTF-8 encoding of the Unicode code point <code>XXXX</code>.</p> </li> <li> <p>Full Unicode support was added to the Windows runtime system. In particular, file names can now contain Unicode characters.</p> </li> <li> <p>An alternate register allocator based on linear scan can be selected with <code>ocamlopt -linscan</code>. It reduces compilation time compared with the default register allocator.</p> </li> <li> <p>The Num library for arbitrary-precision integer and rational arithmetic is no longer part of the core distribution and can be found as a separate OPAM package.</p> </li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2017-11-03 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.06.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.06.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.06/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.06/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.05.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li>Some improvements in performance and usability.</li> <li>Many bug fixes</li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2017-07-13 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.05.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.05.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.05/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.05/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.04.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li> <p>Exceptions can be declared locally within an expression, with syntax <code>let exception ... in ...</code></p> </li> <li> <p>Optimized memory representation for immutable records with a single field, and concrete types with a single constructor with a single argument. This is triggered with a <code>@@unboxed</code> attribute on the type definition.</p> </li> <li> <p>Support for the Spacetime memory profiler was added.</p> </li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2017-06-23 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.04.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.04.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.04/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.04/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.03.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li> <p>A new intermediate representation, called Flambda, was added to the native-code compiler, along with several new optimizations over the Flambda representation, such as aggressive function inlining. (The Flambda optimizer needs to be activated at configuration time by <code>./configure -flambda</code>.)</p> </li> <li> <p>New language feature: inline records as arguments to datatype constructors. This makes it possible to name the arguments of a constructor, and use convenient record notation to access them, without the cost of declaring a separate record type for the arguments.</p> </li> <li> <p>The <code>@unboxed</code> and <code>@untagged</code> attributes are supported on external function declarations to pass parameters and results to C stub functions in a more efficient way. Other attributes honored by the compiler include <code>@tailcall</code> and <code>@inline</code>.</p> </li> <li> <p>Improvements to the garbage collector, resulting in better GC latency (shorter GC pauses).</p> </li> <li> <p>Support for ephemerons, a more general form of GC finalization of data structures.</p> </li> <li> <p>The runtime system is now compiled at higher levels of C optimization, resulting in significant speedups for the bytecode interpreter.</p> </li> <li> <p>New native code generators supporting the PowerPC 64-bit architecture (in big and little-endian modes) and the IBM zSystem architecture.</p> </li> <li> <p>The whole code base (compilers, libraries and tools) is now licensed under the LGPL v2.1 with static linking exception.</p> </li> <li> <p>The ocamlbuild compilation manager was split off and lives as an <a href="https://github.com/ocaml/ocamlbuild/">independent project</a>.</p> </li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2016-04-25 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.03.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.03.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.03/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.03/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.02.3 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li> <p>In a first step towards making strings immutable, a type bytes of mutable byte arrays and a supporting library module <code>Bytes</code> were introduced. By default, <code>bytes</code> is a synonym for <code>string</code>, so existing code that mutates values of type <code>string</code> still compiles, with warnings. Option <code>-safe-string</code> separates the types <code>string</code> and <code>bytes</code>, making strings immutable.</p> </li> <li> <p>The <code>match</code> construct was extended to discriminate not just on the value of its argument expression, but also on exceptions arising out of the evaluation of this expression. This solves an old problem: in a <code>let x = a in b</code>, catch exceptions raised by <code>a</code> but not those raised by <code>b</code>.</p> </li> <li> <p>Module aliases (giving an alternative name to an existing module or compilation unit, as in <code>module M = AnotherModule</code>) are now tracked specially by the type system and the compiler. This enables not only more precise typing of applicative functors, but also more precise dependency analysis at link-time, potentially reducing the size of executables.</p> </li> <li> <p>Annotations can now be attached to most syntactic elements of OCaml sources (expressions, definitions, type declarations, etc). These annotations are used by the compiler (e.g. to warn on uses of functions annotated as deprecated) but also by "ppx" preprocessors, to guide rewriting of abstract syntax trees.</p> </li> <li> <p>Extensible data types can be declared (<code>type t = ..</code>) then later extended with new constructors (<code>type t += A of int</code>). This generalizes the handling of the exn type of exception values.</p> </li> <li> <p>Functors and functor applications can now take a special () argument to force generativity of abstract types.</p> </li> <li> <p>New toplevel directives <code>#show_type</code>, <code>#show_modules</code>, etc, to query the toplevel environment.</p> </li> <li> <p>Performance of <code>ocamlopt</code>-generated code is improved on some programs through more aggressive constant propagation, two new optimization passes (dead code elimination and common subexpression elimination), better compilation of pattern-matching over strings, optimized representation of constant exceptions, and GC tuning for large memory heaps.</p> </li> <li> <p>The format strings argument of <code>printf</code> functions are now represented as a GADT. This speeds up the <code>printf</code> functions considerably, and leads to more precise typechecking of format strings.</p> </li> <li> <p>The native-code compiler now supports the AArch64 (ARM 64 bits) architecture.</p> </li> <li> <p>The Camlp4 preprocessor and the Labltk library were split off the distribution. They are now separate projects.</p> </li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2015-07-27 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.02.3" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.02.3" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.02/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.02/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.01.0 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li> <p>It is now possible to have several variant constructors or record fields of the same name in scope, and type information will be used to disambiguate which one is used -- instead of always using the last one. See <a href="https://www.lexifi.com/blog/ocaml/type-based-selection-label-and-constructors/">this post</a> for a more detailed description of the feature.</p> </li> <li> <p>New warnings can be activated to warn about identifiers that are used after having been shadowed by an <code>open</code> construct. The <code>open</code> keyword can be written <code>open!</code> to silence this warning (as <code>method!</code> silences the method warning).</p> </li> <li> <p>The compiler now suggests possible typos on "unbound identifier" errors.</p> </li> <li> <p>Infix application operators <code>(|>)</code> and <code>(@@)</code> are added to <code>Pervasives</code>.</p> </li> <li> <p>The <code>-short-path</code> option changes the way the type-checker prints types to pick a short representation (eg. <code>string</code> instead of <code>StringSet.elt</code>).</p> </li> <li> <p>This release saw a lot of polishing with sets of changes in many places: the type system for GADTs, compilation speed with <code>-bin-annot</code>, ocamlbuild, the test suite, low-level optimizations, etc.</p> </li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2013-09-12 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.01.0" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.01.0" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.01/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.01/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 4.00.1 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li> <p>The name the language is now officially "OCaml", and this name is used consistently in all the documentation and tool outputs.</p> </li> <li> <p>Generalized Algebraic Data Types (GADTs): this is a powerful extension of the type system that provides great flexibility and power to the programmer.</p> </li> <li> <p>A new and improved ARM back-end.</p> </li> <li> <p>Changes to first-class modules: type annotations can now be omitted when packing and unpacking modules (and are inferred from context whenever possible), and first-class modules can now be unpacked by pattern-matching.</p> </li> <li> <p>Support for randomized hash tables to avoid denial-of-service vulnerabilities.</p> </li> <li> <p>Installation of the compiler's internal libraries in <code>+compiler-libs</code> for easier access by third-party programming tools.</p> </li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2012-10-05 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/4.00.1" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/4.00.1" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/4.00/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/4.00/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> <div class="flex flex-col lg:flex-row"> <div class="py-4 px-6 font-semibold text-title dark:text-dark-title lg:w-2/3 w-full"> <div class="font-semibold"> 3.12.1 </div> <div class="prose dark:prose-invert prose-orange font-normal"> <ul> <li> <p>Polymorphic recursion is supported, using explicit type declarations on the recursively-defined identifiers.</p> </li> <li> <p>First-class modules: module expressions can be embedded as values of the core language, then manipulated like any other first-class value, then projected back to the module level.</p> </li> <li> <p>New operator to modify a signature a posteriori: <code>S with type t := tau</code> denotes signature <code>S</code> where the <code>t</code> type component is removed and substituted by the type <code>tau</code> elsewhere.</p> </li> <li> <p>New notations for record expressions and record patterns: <code>{ lbl }</code> as shorthand for <code>{ lbl = lbl }</code>, and <code>{ ...; _ }</code> marks record patterns where some labels were intentionally omitted.</p> </li> <li> <p>Local open <code>let open ... in ...</code> now supported by popular demand.</p> </li> <li> <p>Type variables can be bound as type parameters to functions; such types are treated like abstract types within the function body, and like type variables (possibly generalized) outside.</p> </li> <li> <p>The <code>module type of</code> construct enables to recover the module type of a given module.</p> </li> <li> <p>Explicit method override using the <code>method!</code> keyword, with associated warnings and errors.</p> </li> </ul> </div> </div> <div class="lg:w-1/3 flex w-full lg:flex-row lg:justify-between flex-col"> <div class="py-4 px-6 font-medium align-top lg:w-1/2 w-full text-content dark:text-dark-content"> 2011-07-04 </div> <div class="py-4 px-6 align-top lg:w-1/2 w-full"> <a href="/releases/3.12.1" class="text-primary dark:text-dark-primary font-medium block"> Release Notes </a> <a href="/p/ocaml/3.12.1" class="text-primary dark:text-dark-primary font-medium block"> OCaml Package </a> <a href="/manual/3.12/index.html" class="text-primary dark:text-dark-primary font-medium block"> Language Manual </a> <a href="/manual/3.12/api/index.html" class="text-primary dark:text-dark-primary font-medium block"> Standard Library API </a> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </main> <button class="fixed bottom-8 right-10 md:bottom-[5rem] lg:bottom-[8.37rem] lg:right-[6.5rem] border-0 hidden focus:outline-none z-50 rounded-full shadow-custom p-4 bg-primary dark:bg-dark-primary" onclick="scrollToTop()" id="scrollToTop" title="Scroll to top"><svg class="h-6 w-6" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> <path d="M4.5 10.5L12 3M12 3L19.5 10.5M12 3V21" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg> </button> <footer x-data class="border-t border-separator_30 dark:border-dark-separator_30 bg-dark-sand dark:bg-dark-card" aria-labelledby="footer-heading"> <h2 id="footer-heading" class="sr-only">Footer</h2> <div class="mx-auto max-w-7xl px-6 py-16 lg:px-8"> <div class="flex w-full items-center justify-between mb-8"> <a href="/"><img class="h-8 dark:hidden" src="/_/MDBjN2M4YjIxY2Y1YWExZWE3Njk4M2FiZTg1NWZjNTM/logo-with-name.svg" alt="OCaml"> <img class="h-8 hidden dark:inline" src="/_/MTE3YWE5YzJlZmExNmYyMmI3ZmEwYjliMDEwNDBkMDY/logo-with-name-white.svg" alt="OCaml"> </a> <div class="hidden md:flex"> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border rounded-l rounded-l-full border-r-0" :class='$store.themeSettings.preference === "light" ? "bg-gradient-to-r from-[#FFA932] to-[#C24F1E] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("light")' > <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none" class="mr-2"> <path d="M7 0.5V2.125M11.5962 2.40378L10.4472 3.55283M13.5 7H11.875M11.5962 11.5962L10.4472 10.4472M7 11.875V13.5M3.55283 10.4472L2.40378 11.5962M2.125 7H0.5M3.55283 3.55283L2.40378 2.40378M9.70833 7C9.70833 7.71829 9.42299 8.40717 8.91508 8.91508C8.40717 9.42299 7.71829 9.70833 7 9.70833C6.28171 9.70833 5.59283 9.42299 5.08492 8.91508C4.57701 8.40717 4.29167 7.71829 4.29167 7C4.29167 6.28171 4.57701 5.59283 5.08492 5.08492C5.59283 4.57701 6.28171 4.29167 7 4.29167C7.71829 4.29167 8.40717 4.57701 8.91508 5.08492C9.42299 5.59283 9.70833 6.28171 9.70833 7Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> Light </button> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border border-r-0" :class='$store.themeSettings.preference === "dark" ? "bg-gradient-to-r from-[#0F254F] to-[#0B1228] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("dark")' > <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" class="mr-2"> <path d="M11.1573 7.90842C10.5134 8.17678 9.8226 8.3145 9.125 8.31358C6.20812 8.31358 3.84375 5.94921 3.84375 3.03233C3.84375 2.31192 3.98783 1.62562 4.24892 1C3.28663 1.40144 2.46465 2.07865 1.88651 2.94635C1.30836 3.81404 0.999911 4.83342 1 5.87608C1 8.79296 3.36437 11.1573 6.28125 11.1573C7.32391 11.1574 8.34329 10.849 9.21099 10.2708C10.0787 9.69268 10.7559 8.8707 11.1573 7.90842Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> Dark </button> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border rounded-r rounded-r-full" :class='$store.themeSettings.preference === "system" ? "bg-gradient-to-r from-[#2B7866] to-[#004039] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("system")' > <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" class="mr-2"> <path d="M7.19553 2.955C7.26303 2.5485 7.61553 2.25 8.02803 2.25H9.97278C10.3853 2.25 10.7378 2.5485 10.8053 2.955L10.965 3.91575C11.0123 4.19625 11.1998 4.43025 11.4488 4.56825C11.5043 4.59825 11.559 4.6305 11.6138 4.6635C11.8575 4.8105 12.1538 4.85625 12.42 4.7565L13.3328 4.4145C13.5198 4.34416 13.7258 4.34248 13.9139 4.40978C14.1021 4.47708 14.2603 4.60899 14.3603 4.782L15.3323 6.46725C15.4321 6.64028 15.4672 6.8431 15.4315 7.03962C15.3958 7.23615 15.2916 7.41363 15.1373 7.5405L14.385 8.16075C14.1653 8.3415 14.0565 8.6205 14.0625 8.90475C14.0636 8.9685 14.0636 9.03225 14.0625 9.096C14.0565 9.3795 14.1653 9.6585 14.385 9.83925L15.138 10.4595C15.456 10.722 15.5385 11.1758 15.333 11.532L14.3595 13.2172C14.2597 13.3902 14.1017 13.5222 13.9137 13.5896C13.7257 13.657 13.5198 13.6556 13.3328 13.5855L12.42 13.2435C12.1538 13.1438 11.8575 13.1895 11.613 13.3365C11.5587 13.3696 11.5037 13.4016 11.448 13.4325C11.1998 13.5697 11.0123 13.8037 10.965 14.0842L10.8053 15.045C10.7378 15.4523 10.3853 15.75 9.97278 15.75H8.02728C7.61478 15.75 7.26303 15.4515 7.19478 15.045L7.03503 14.0842C6.98853 13.8037 6.80103 13.5698 6.55203 13.4318C6.49642 13.4011 6.44141 13.3693 6.38703 13.3365C6.14328 13.1895 5.84703 13.1438 5.58003 13.2435L4.66728 13.5855C4.48033 13.6556 4.27456 13.6572 4.08656 13.5899C3.89856 13.5226 3.74051 13.3908 3.64053 13.218L2.66778 11.5328C2.56799 11.3597 2.53282 11.1569 2.56852 10.9604C2.60423 10.7639 2.7085 10.5864 2.86278 10.4595L3.61578 9.83925C3.83478 9.65925 3.94353 9.3795 3.93828 9.096C3.93711 9.03226 3.93711 8.96849 3.93828 8.90475C3.94353 8.61975 3.83478 8.3415 3.61578 8.16075L2.86278 7.5405C2.70869 7.41367 2.60454 7.23633 2.56884 7.03997C2.53314 6.84361 2.56819 6.64095 2.66778 6.468L3.64053 4.78275C3.74042 4.6096 3.89854 4.47754 4.08672 4.4101C4.27489 4.34266 4.4809 4.34422 4.66803 4.4145L5.58003 4.7565C5.84703 4.85625 6.14328 4.8105 6.38703 4.6635C6.44103 4.6305 6.49653 4.599 6.55203 4.5675C6.80103 4.43025 6.98853 4.19625 7.03503 3.91575L7.19553 2.955Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> <path d="M11.25 9C11.25 9.59674 11.0129 10.169 10.591 10.591C10.169 11.0129 9.59674 11.25 9 11.25C8.40326 11.25 7.83097 11.0129 7.40901 10.591C6.98705 10.169 6.75 9.59674 6.75 9C6.75 8.40326 6.98705 7.83097 7.40901 7.40901C7.83097 6.98705 8.40326 6.75 9 6.75C9.59674 6.75 10.169 6.98705 10.591 7.40901C11.0129 7.83097 11.25 8.40326 11.25 9Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> System </button> </div> </div> <div class="xl:grid xl:grid-cols-3 xl:gap-8"> <div class="space-y-8"> <p class="text-base leading-6 text-title dark:text-dark-content">Innovation. Community. Security.</p> <div class="flex space-x-6"> <a href="https://github.com/ocaml" class="text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <span class="sr-only">GitHub</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clip-rule="evenodd" /> </svg> </a> <a href="https://discord.gg/cCYQbqN" class="text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <span class="sr-only">Discord</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M18.9419 5.29661C17.6473 4.69088 16.263 4.25066 14.8157 4C14.638 4.32134 14.4304 4.75355 14.2872 5.09738C12.7487 4.86601 11.2245 4.86601 9.7143 5.09738C9.57116 4.75355 9.3588 4.32134 9.17947 4C7.73067 4.25066 6.3448 4.6925 5.05016 5.29982C2.43887 9.24582 1.73099 13.0938 2.08493 16.8872C3.81688 18.1805 5.49534 18.9662 7.14548 19.4804C7.55291 18.9196 7.91628 18.3235 8.22931 17.6953C7.63313 17.4688 7.06211 17.1892 6.52256 16.8647C6.6657 16.7586 6.80571 16.6478 6.94098 16.5337C10.2318 18.0729 13.8074 18.0729 17.0589 16.5337C17.1958 16.6478 17.3358 16.7586 17.4774 16.8647C16.9362 17.1908 16.3637 17.4704 15.7675 17.697C16.0805 18.3235 16.4423 18.9212 16.8513 19.4819C18.503 18.9678 20.183 18.1822 21.915 16.8872C22.3303 12.4897 21.2056 8.67705 18.9419 5.29661ZM8.67765 14.5543C7.68977 14.5543 6.87963 13.632 6.87963 12.509C6.87963 11.3859 7.67247 10.4621 8.67765 10.4621C9.68285 10.4621 10.493 11.3843 10.4757 12.509C10.4772 13.632 9.68285 14.5543 8.67765 14.5543ZM15.3223 14.5543C14.3344 14.5543 13.5243 13.632 13.5243 12.509C13.5243 11.3859 14.3171 10.4621 15.3223 10.4621C16.3275 10.4621 17.1376 11.3843 17.1203 12.509C17.1203 13.632 16.3275 14.5543 15.3223 14.5543Z" clip-rule="evenodd" /> </svg> </a> <a href="https://twitter.com/ocaml_org" class="text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <span class="sr-only">Twitter</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" /> </svg> </a> <a href="https://watch.ocaml.org/" class="text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <span class="sr-only">Peertube</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M5 2V12L12.4998 7.00047" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M5 12V22L12.4998 17.0005" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M12.4998 6.99951V16.9995L19.9995 12" clip-rule="evenodd" /> </svg> </a> <a href="/planet.xml" class="text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary"> <span class="sr-only">RSS</span> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true"> <path fill-rule="evenodd" d="M15.2692 22H11.3846C11.3846 16.8462 7.11538 12.6154 2 12.6154V8.73077C9.26923 8.73077 15.2692 14.7308 15.2692 22ZM18 22C18 13.2308 10.7692 6 2 6V2C12.9615 2 22 11.0385 22 22H18Z" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M4.73077 22C6.23893 22 7.46154 20.7774 7.46154 19.2692C7.46154 17.7611 6.23893 16.5385 4.73077 16.5385C3.22261 16.5385 2 17.7611 2 19.2692C2 20.7774 3.22261 22 4.73077 22Z" clip-rule="evenodd" /> </svg> </a> </div> <div class="flex w-full md:hidden"> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border rounded-l rounded-l-full border-r-0" :class='$store.themeSettings.preference === "light" ? "bg-gradient-to-r from-[#FFA932] to-[#C24F1E] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("light")' > <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none" class="mr-2"> <path d="M7 0.5V2.125M11.5962 2.40378L10.4472 3.55283M13.5 7H11.875M11.5962 11.5962L10.4472 10.4472M7 11.875V13.5M3.55283 10.4472L2.40378 11.5962M2.125 7H0.5M3.55283 3.55283L2.40378 2.40378M9.70833 7C9.70833 7.71829 9.42299 8.40717 8.91508 8.91508C8.40717 9.42299 7.71829 9.70833 7 9.70833C6.28171 9.70833 5.59283 9.42299 5.08492 8.91508C4.57701 8.40717 4.29167 7.71829 4.29167 7C4.29167 6.28171 4.57701 5.59283 5.08492 5.08492C5.59283 4.57701 6.28171 4.29167 7 4.29167C7.71829 4.29167 8.40717 4.57701 8.91508 5.08492C9.42299 5.59283 9.70833 6.28171 9.70833 7Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> Light </button> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border border-r-0" :class='$store.themeSettings.preference === "dark" ? "bg-gradient-to-r from-[#0F254F] to-[#0B1228] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("dark")' > <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none" class="mr-2"> <path d="M11.1573 7.90842C10.5134 8.17678 9.8226 8.3145 9.125 8.31358C6.20812 8.31358 3.84375 5.94921 3.84375 3.03233C3.84375 2.31192 3.98783 1.62562 4.24892 1C3.28663 1.40144 2.46465 2.07865 1.88651 2.94635C1.30836 3.81404 0.999911 4.83342 1 5.87608C1 8.79296 3.36437 11.1573 6.28125 11.1573C7.32391 11.1574 8.34329 10.849 9.21099 10.2708C10.0787 9.69268 10.7559 8.8707 11.1573 7.90842Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> Dark </button> <button class="flex grow basis-0 justify-center items-center py-2 px-4 text-sm border rounded-r rounded-r-full" :class='$store.themeSettings.preference === "system" ? "bg-gradient-to-r from-[#2B7866] to-[#004039] text-white dark:text-dark-title outline-none" : "bg-white text-content outline-2 outline-card_border dark:outline-dark-separator_30"' @click='$store.themeSettings.setPreference("system")' > <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18" fill="none" class="mr-2"> <path d="M7.19553 2.955C7.26303 2.5485 7.61553 2.25 8.02803 2.25H9.97278C10.3853 2.25 10.7378 2.5485 10.8053 2.955L10.965 3.91575C11.0123 4.19625 11.1998 4.43025 11.4488 4.56825C11.5043 4.59825 11.559 4.6305 11.6138 4.6635C11.8575 4.8105 12.1538 4.85625 12.42 4.7565L13.3328 4.4145C13.5198 4.34416 13.7258 4.34248 13.9139 4.40978C14.1021 4.47708 14.2603 4.60899 14.3603 4.782L15.3323 6.46725C15.4321 6.64028 15.4672 6.8431 15.4315 7.03962C15.3958 7.23615 15.2916 7.41363 15.1373 7.5405L14.385 8.16075C14.1653 8.3415 14.0565 8.6205 14.0625 8.90475C14.0636 8.9685 14.0636 9.03225 14.0625 9.096C14.0565 9.3795 14.1653 9.6585 14.385 9.83925L15.138 10.4595C15.456 10.722 15.5385 11.1758 15.333 11.532L14.3595 13.2172C14.2597 13.3902 14.1017 13.5222 13.9137 13.5896C13.7257 13.657 13.5198 13.6556 13.3328 13.5855L12.42 13.2435C12.1538 13.1438 11.8575 13.1895 11.613 13.3365C11.5587 13.3696 11.5037 13.4016 11.448 13.4325C11.1998 13.5697 11.0123 13.8037 10.965 14.0842L10.8053 15.045C10.7378 15.4523 10.3853 15.75 9.97278 15.75H8.02728C7.61478 15.75 7.26303 15.4515 7.19478 15.045L7.03503 14.0842C6.98853 13.8037 6.80103 13.5698 6.55203 13.4318C6.49642 13.4011 6.44141 13.3693 6.38703 13.3365C6.14328 13.1895 5.84703 13.1438 5.58003 13.2435L4.66728 13.5855C4.48033 13.6556 4.27456 13.6572 4.08656 13.5899C3.89856 13.5226 3.74051 13.3908 3.64053 13.218L2.66778 11.5328C2.56799 11.3597 2.53282 11.1569 2.56852 10.9604C2.60423 10.7639 2.7085 10.5864 2.86278 10.4595L3.61578 9.83925C3.83478 9.65925 3.94353 9.3795 3.93828 9.096C3.93711 9.03226 3.93711 8.96849 3.93828 8.90475C3.94353 8.61975 3.83478 8.3415 3.61578 8.16075L2.86278 7.5405C2.70869 7.41367 2.60454 7.23633 2.56884 7.03997C2.53314 6.84361 2.56819 6.64095 2.66778 6.468L3.64053 4.78275C3.74042 4.6096 3.89854 4.47754 4.08672 4.4101C4.27489 4.34266 4.4809 4.34422 4.66803 4.4145L5.58003 4.7565C5.84703 4.85625 6.14328 4.8105 6.38703 4.6635C6.44103 4.6305 6.49653 4.599 6.55203 4.5675C6.80103 4.43025 6.98853 4.19625 7.03503 3.91575L7.19553 2.955Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> <path d="M11.25 9C11.25 9.59674 11.0129 10.169 10.591 10.591C10.169 11.0129 9.59674 11.25 9 11.25C8.40326 11.25 7.83097 11.0129 7.40901 10.591C6.98705 10.169 6.75 9.59674 6.75 9C6.75 8.40326 6.98705 7.83097 7.40901 7.40901C7.83097 6.98705 8.40326 6.75 9 6.75C9.59674 6.75 10.169 6.98705 10.591 7.40901C11.0129 7.83097 11.25 8.40326 11.25 9Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/> </svg> System </button> </div> </div> <div class="mt-8 grid grid-cols-2 gap-8 xl:col-span-2 xl:mt-0"> <div class="md:grid md:grid-cols-2 md:gap-8"> <div> <h3 class="text-base font-semibold leading-6 text-title dark:text-dark-content">About OCaml</h3> <ul class="mt-6 space-y-4"> <li> <a href="/changelog" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Changelog</a> </li> <li> <a href="/releases" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Releases</a> </li> <li> <a href="/industrial-users" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Industrial Users</a> </li> <li> <a href="/academic-users" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Academic Users</a> </li> <li> <a href="/about" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Why OCaml</a> </li> </ul> </div> <div class="mt-10 md:mt-0"> <h3 class="text-base font-semibold leading-6 text-title dark:text-dark-content">Resources</h3> <ul class="mt-6 space-y-4"> <li> <a href="/install" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Install OCaml</a> </li> <li> <a href="/docs/get-started" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Get Started</a> </li> <li> <a href="/docs/tools" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Platform Tools</a> </li> <li> <a href="/manual" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Language Manual</a> </li> <li> <a href="/api" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Standard Library API</a> </li> <li> <a href="/books" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Books</a> </li> <li> <a href="/exercises" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Exercises</a> </li> <li> <a href="/papers" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Papers</a> </li> <li> <a href="/play" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">OCaml Playground</a> </li> <li> <a href="/logo" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Logo</a> </li> </ul> </div> </div> <div class="md:grid md:grid-cols-2 md:gap-8"> <div> <h3 class="text-base font-semibold leading-6 text-title dark:text-dark-content">Ecosystem</h3> <ul class="mt-6 space-y-4"> <li> <a href="/packages" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Packages</a> </li> <li> <a href="/community" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Community</a> </li> <li> <a href="/events" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Events</a> </li> <li> <a href="/ocaml-planet" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">OCaml Planet</a> </li> <li> <a href="/jobs" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Jobs</a> </li> </ul> </div> <div class="mt-20 md:mt-0"> <h3 class="text-base font-semibold leading-6 text-title dark:text-dark-content">Policies</h3> <ul class="mt-6 space-y-4"> <li> <a href="/policies/carbon-footprint" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Carbon Footprint</a> </li> <li> <a href="/governance" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Governance</a> </li> <li> <a href="/policies/privacy-policy" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Privacy</a> </li> <li> <a href="/policies/code-of-conduct" class="text-base leading-6 text-content dark:text-dark-title hover:text-primary dark:hover:text-dark-primary">Code of Conduct</a> </li> </ul> </div> </div> </div> </div> </div> <script> document.addEventListener('alpine:init', () => { Alpine.store('themeSettings', { init() { this.storageAccess = localStorage.getItem('storageAccess') this.preference = localStorage.getItem('theme') || "system" this.isSystemDefaultDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches }, selected: '', alertOpen: false, storageAccess: false, preference: undefined, isSystemDefaultDark: false, setPreference(preference) { if (!this.storageAccess) { if (!window.confirm("We will remember your choice in your browser's LocalStorage. Allow this?")) { return; } localStorage.setItem('storageAccess', true) storageAccess = true; } this.selected = preference; this.preference = preference localStorage.setItem('theme', preference) if (preference === 'dark') { document.body.classList.add("dark"); } if (preference === 'light') { document.body.classList.remove("dark"); } if (preference === 'system') { if (this.isSystemDefaultDark) { document.body.classList.add("dark"); } else { document.body.classList.remove("dark"); } localStorage.removeItem('theme') return } }, }) }) </script> </footer> <script> function scrollToTop() { window.scrollTo(0, 0); } window.onscroll = function() { showScrollButton(); }; function showScrollButton() { if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { document.getElementById("scrollToTop").style.display = "block"; } else { document.getElementById("scrollToTop").style.display = "none"; } } </script> </body> </html>