summaryrefslogtreecommitdiff
path: root/common.sml
diff options
context:
space:
mode:
authorVladimir Azarov <avm@intermediate-node.net>2025-08-01 19:26:54 +0200
committerVladimir Azarov <avm@intermediate-node.net>2025-08-01 19:26:54 +0200
commitb3f8ca28af653dcb5fdc10e8c70439d86c043635 (patch)
tree168ef8c424c4688d3ae5fdcb30ecb10d81eeca35 /common.sml
parent0a091754ea2d9944e35215d67604c58c6f874cbd (diff)
Remove fp support
Diffstat (limited to 'common.sml')
-rw-r--r--common.sml26
1 files changed, 0 insertions, 26 deletions
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)