From 30fece6537622595dc0853514cc850227cdd169f Mon Sep 17 00:00:00 2001 From: Tissevert Date: Mon, 24 Feb 2020 21:39:02 +0100 Subject: [PATCH] Notice the 'edit' I exported earlier could be reused to simplify the w implementation of the proof that Box is a transitive relation --- .gitignore | 1 + src/PDF/Box.hs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ebadcab..ad2660f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ dist*/ .ghc.environment.* +cabal.project.local diff --git a/src/PDF/Box.hs b/src/PDF/Box.hs index a72ff4e..f36b199 100644 --- a/src/PDF/Box.hs +++ b/src/PDF/Box.hs @@ -25,7 +25,7 @@ modifyAt i f = get >>= edit i f >>= put instance (Box m i a b, Box m j b c) => Box m (i, j) a c where r (i, j) a = r i a >>= r j - w (i, j) a c = r i a >>= flip (w j) c >>= w i a + w (i, j) a c = edit i (flip (w j) c) a infixr 6 .@ (.@) :: a -> b -> (a, b)