From 5ded571e83d75ffd36ac60e4a2b8fdc811266ee0 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 26 Mar 2018 10:41:11 -0400 Subject: [PATCH] :memo: Quietly. --- src/Analysis/Abstract/Quiet.hs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Analysis/Abstract/Quiet.hs b/src/Analysis/Abstract/Quiet.hs index e2d0d3127..827311cb3 100644 --- a/src/Analysis/Abstract/Quiet.hs +++ b/src/Analysis/Abstract/Quiet.hs @@ -6,6 +6,13 @@ import Control.Monad.Effect.Resumable import Data.Abstract.Evaluatable import Prologue +-- | An analysis which resumes exceptions instead of failing. +-- +-- Use it by composing it onto an analysis: +-- +-- > runAnalysis @(Quietly Evaluating term value) (…) +-- +-- Note that exceptions thrown by other analyses may not be caught if 'Quietly' doesn’t know about them, i.e. if they’re not part of the generic 'MonadValue', 'MonadAddressable', etc. machinery. newtype Quietly m term value (effects :: [* -> *]) a = Quietly (m term value effects a) deriving (Alternative, Applicative, Functor, Effectful, Monad, MonadFail, MonadFresh, MonadNonDet)