From 76c6103e6422c1ef4f1ad5dce07a1b7221925b7c Mon Sep 17 00:00:00 2001 From: Serhii Khoma Date: Thu, 27 Jan 2022 14:52:07 +0200 Subject: [PATCH] Update Var.purs --- src/Control/Monad/Eff/Var.purs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Control/Monad/Eff/Var.purs b/src/Control/Monad/Eff/Var.purs index 66fad88..07997e3 100644 --- a/src/Control/Monad/Eff/Var.purs +++ b/src/Control/Monad/Eff/Var.purs @@ -1,16 +1,15 @@ -- | `Var`s allow to provide a uniform read/write access to the references in --- | the `Eff` monad. This is mostly useful when making low-level FFI bindings. +-- | the `Effect` monad. This is mostly useful when making low-level FFI bindings. -- | For example we might have some global counter with the following API: -- | ```purescript --- | foreign import data COUNT :: ! --- | getCounter :: forall eff. Eff (count :: COUNT | eff) Int --- | setCounter :: forall eff. Int -> Eff (count :: COUNT | eff) Unit +-- | getCounter :: Effect Int +-- | setCounter :: Int -> Effect Unit -- | ``` -- | -- | `getCounter` and `setCounter` can be kept together in a `Var`: -- | ```purescript --- | counter :: forall eff. Var (count :: COUNT | eff) Int +-- | counter :: Var Int -- | counter = makeVar getCounter setCounter -- | ``` -- |