From dc6238dbc20af0e3d53a5397b57c4c96b7040180 Mon Sep 17 00:00:00 2001 From: Konstantin Zudov Date: Sat, 8 Oct 2016 17:26:41 +0300 Subject: [PATCH] Add functional dependencies --- src/Control/Monad/Eff/Var.purs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Control/Monad/Eff/Var.purs b/src/Control/Monad/Eff/Var.purs index 5fc0049..03e35a9 100644 --- a/src/Control/Monad/Eff/Var.purs +++ b/src/Control/Monad/Eff/Var.purs @@ -56,18 +56,18 @@ import Data.Functor.Contravariant (class Contravariant, (>$<)) import Data.Functor.Invariant (class Invariant) -- | Typeclass for vars that can be read. -class Gettable (eff :: # !) (var :: * -> *) (a :: *) where +class Gettable (eff :: # !) (var :: * -> *) (a :: *) | var -> a, var -> eff where get :: var a -> Eff eff a -- | Typeclass for vars that can be written. -class Settable (eff :: # !) (var :: * -> *) (a :: *) where +class Settable (eff :: # !) (var :: * -> *) (a :: *) | var -> a, var -> eff where set :: var a -> a -> Eff eff Unit -- | Alias for `set`. infixr 2 set as $= -- | Typeclass for vars that can be updated. -class Updatable (eff :: # !) (var :: * -> *) (a :: *) where +class Updatable (eff :: # !) (var :: * -> *) (a :: *) | var -> a, var -> eff where update :: var a -> (a -> a) -> Eff eff Unit -- | Alias for `get`