diff --git a/src/lib/Qd/Observable.hs b/src/lib/Qd/Observable.hs index 2fc1a016642e7eb1e01b9759c586a3519d6cc350..c53e2b9b80d7aa523a3251ae4ecbea68a48c677b 100644 --- a/src/lib/Qd/Observable.hs +++ b/src/lib/Qd/Observable.hs @@ -4,7 +4,7 @@ module Qd.Observable ( SomeObservable(..), Gettable(..), Observable(..), - getValueE, + unsafeGetValue, subscribe', SubscriptionHandle(..), RegistrationHandle(..), @@ -75,8 +75,8 @@ class Gettable v o => Observable v o | o -> v where mapObservableM f = SomeObservable . MappedObservable f -- | Variant of `getValue` that throws exceptions instead of returning them. -getValueE :: (Exception e, Observable (Either e v) o) => o -> IO v -getValueE = either throw return <=< getValue +unsafeGetValue :: (Exception e, Observable (Either e v) o) => o -> IO v +unsafeGetValue = either throw return <=< getValue -- | A variant of `subscribe` that passes the `SubscriptionHandle` to the callback. subscribe' :: Observable v o => o -> (SubscriptionHandle -> ObservableMessage v -> IO ()) -> IO SubscriptionHandle