mirror of
https://github.com/polysemy-research/polysemy.git
synced 2024-12-12 02:13:15 +03:00
runIgnoringTrace
This commit is contained in:
parent
6e11e06f30
commit
f17ad3fc66
@ -20,6 +20,12 @@ runTraceIO = interpret $ \case
|
||||
{-# INLINE runTraceIO #-}
|
||||
|
||||
|
||||
runIgnoringTrace :: Member (Lift IO) r => Semantic (Trace ': r) a -> Semantic r a
|
||||
runIgnoringTrace = interpret $ \case
|
||||
Trace _ k -> pure k
|
||||
{-# INLINE runIgnoringTrace #-}
|
||||
|
||||
|
||||
runTraceAsOutput :: Semantic (Trace ': r) a -> Semantic (Output String ': r) a
|
||||
runTraceAsOutput = reinterpret $ \case
|
||||
Trace m k -> output m >> pure k
|
||||
|
Loading…
Reference in New Issue
Block a user