1
1
mirror of https://github.com/github/semantic.git synced 2024-12-21 05:41:54 +03:00

📝 Quietly.

This commit is contained in:
Rob Rix 2018-03-26 10:41:11 -04:00
parent 24b98ced9b
commit 5ded571e83

View File

@ -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' doesnt know about them, i.e. if theyre 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)