From 511174316336bb34f56e342dcf48a32082164bc1 Mon Sep 17 00:00:00 2001 From: Justin Grubbs Date: Mon, 3 Jun 2024 12:44:41 -0500 Subject: [PATCH] Cleaned up random definition in interpreter --- src/Disco/Interpret/CESK.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Disco/Interpret/CESK.hs b/src/Disco/Interpret/CESK.hs index a2d225e1..984cf5a0 100644 --- a/src/Disco/Interpret/CESK.hs +++ b/src/Disco/Interpret/CESK.hs @@ -432,9 +432,9 @@ appConst k = \case -------------------------------------------------- -- Randomness - ORandom -> arity2 (\t g -> arity2 (\v1 v2 -> - let (a,g') = R.randomR (vint v1,vint v2) (vgen g) - in out $ VPair (intv a) (genv g')) t) + ORandom -> arity2 . flip $ \g -> arity2 $ \v1 v2 -> + let (a,g') = R.randomR (vint v1,vint v2) (vgen g) + in out $ VPair (intv a) (genv g') OSeed -> out . VGen . (R.mkStdGen . fromIntegral . vint) -------------------------------------------------- -- Graph operations