From fe09969a533fe5830082a6ca2ac9ff09a96abd46 Mon Sep 17 00:00:00 2001 From: Josh Berdine Date: Tue, 17 Mar 2020 09:05:59 -0700 Subject: [PATCH] [sledge] Move basic function and tuple operations to Import0 Reviewed By: ngorogiannis Differential Revision: D20482764 fbshipit-source-id: c40185297 --- sledge/lib/import/import.ml | 14 -------------- sledge/lib/import/import0.ml | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sledge/lib/import/import.ml b/sledge/lib/import/import.ml index 79515663f..617ff4bcf 100644 --- a/sledge/lib/import/import.ml +++ b/sledge/lib/import/import.ml @@ -10,20 +10,6 @@ include Stdio include Import0 -(** Tuple operations *) - -let fst3 (x, _, _) = x -let snd3 (_, y, _) = y -let trd3 (_, _, z) = z - -(** Function combinators *) - -let ( >> ) f g x = g (f x) -let ( << ) f g x = f (g x) -let ( $ ) f g x = f x ; g x -let ( $> ) x f = f x ; x -let ( <$ ) f x = f x ; x - (** Failures *) let fail = Trace.fail diff --git a/sledge/lib/import/import0.ml b/sledge/lib/import/import0.ml index 4c87d7c34..5b59a1b06 100644 --- a/sledge/lib/import/import0.ml +++ b/sledge/lib/import/import0.ml @@ -35,6 +35,20 @@ external equal : int -> int -> bool = "%equal" let min x y = if x <= y then x else y let max x y = if x >= y then x else y +(** Tuple operations *) + +let fst3 (x, _, _) = x +let snd3 (_, y, _) = y +let trd3 (_, _, z) = z + +(** Function combinators *) + +let ( >> ) f g x = g (f x) +let ( << ) f g x = f (g x) +let ( $ ) f g x = f x ; g x +let ( $> ) x f = f x ; x +let ( <$ ) f x = f x ; x + (** Pretty-printer for argument type. *) type 'a pp = Format.formatter -> 'a -> unit