From b3f8ca28af653dcb5fdc10e8c70439d86c043635 Mon Sep 17 00:00:00 2001 From: Vladimir Azarov Date: Fri, 1 Aug 2025 19:26:54 +0200 Subject: Remove fp support --- common.sml | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'common.sml') diff --git a/common.sml b/common.sml index 3fd58c2..ffb4fa6 100644 --- a/common.sml +++ b/common.sml @@ -6,32 +6,6 @@ fun id x = x fun assert truth = if not truth then raise Unreachable else () -(* All global values which computations may raise an exception must be - * wrapped in lazy, so that no exception is thrown before custom - * top-level handler is set. - *) -fun lazy thunk = -let - datatype 'a value = - Unevaluated of unit -> 'a | - Evaluated of 'a | - Exn of exn - - val value = ref $ Unevaluated thunk -in - fn () => - case !value of - Unevaluated th => - let - val x = th () handle e => (value := Exn e; raise e) - in - value := Evaluated x; - x - end - | Evaluated v => v - | Exn e => raise e -end - structure Fold = struct fun fold (a, f) g = g (a, f) fun step0 h (a, f) = fold (h a, f) -- cgit v1.2.3