package core_kernel

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file never_returns.ml

1
2
3
4
5
6
7
8
9
10
11
(** [never_returns] should be used as the return type of functions that don't return and
    might block forever, rather than ['a] or [_].  This forces callers of such functions
    to have a call to [never_returns] at the call site, which makes it clear to readers
    what's going on. We do not intend to use this type for functions such as [failwithf]
    that always raise an exception. *)

open! Import

type never_returns = Nothing.t [@@deriving sexp_of]

let never_returns = Nothing.unreachable_code