Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: bottom types and threaded exits
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Damien Doligez <doligez@b...>
Subject: Re: bottom types and threaded exits
>From: Remi VANICAT <remi.vanicat@labri.u-bordeaux.fr>

>exception Sould_never_be_here
>
>let f () = while true do () done ; raise Sould_never_be_here

That's what "assert false" was invented for: the canonical expression
that "returns" a result of type 'a and should normally never be
evaluated.

let f () = while true do () done; assert false;;

-- Damien