From 844830e9654c286d1d96bad51eb4e7d30b132653 Mon Sep 17 00:00:00 2001 From: Jens Nolte <git@queezle.net> Date: Sun, 8 Nov 2020 02:41:01 +0100 Subject: [PATCH] Rename getValueE to unsafeGetValue --- src/lib/Qd/Observable.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/Qd/Observable.hs b/src/lib/Qd/Observable.hs index 2fc1a01..c53e2b9 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 -- GitLab