mirror of
https://github.com/polysemy-research/polysemy.git
synced 2024-09-11 02:25:43 +03:00
Hide visibility of Polysemy.Fixpoint.bomb, fix changelog (#202)
This commit is contained in:
parent
5a28c435ec
commit
e4ad26105c
@ -30,13 +30,13 @@
|
||||
- Renamed `runTraceAsOutput` to `traceToOutput`
|
||||
- Renamed `runTraceIO` to `traceToIO`
|
||||
- Renamed `sendM` to `embed` (thanks to @googleson78)
|
||||
- The `NonDet` effect will no longer perform effects in untaken branches (thanks to @KingoftheHomeless)
|
||||
- The `NonDet` effect is now higher-order (thanks to @KingoftheHomeless)
|
||||
|
||||
### Other Changes
|
||||
|
||||
- Added `evalState` and `evalLazyState`
|
||||
- Added `runNonDetMaybe` (thanks to @KingoftheHomeless)
|
||||
- Added `nonDetToMaybe` (thanks to @KingoftheHomeless)
|
||||
- Added `nonDetToError` (thanks to @KingoftheHomeless)
|
||||
- Haddock documentation for smart constructors generated via `makeSem` will no
|
||||
longer have weird variable names (thanks to @TheMatten)
|
||||
|
||||
|
@ -81,14 +81,3 @@ runFixpointM lower = interpretH $ \case
|
||||
lower . runFixpointM lower . c $
|
||||
fromMaybe (bomb "runFixpointM") (inspect ins fa) <$ s
|
||||
{-# INLINE runFixpointM #-}
|
||||
|
||||
|
||||
bomb :: String -> a
|
||||
bomb str = error $
|
||||
str ++ ": Internal computation failed.\
|
||||
\ This is likely because you have tried to recursively use\
|
||||
\ the result of a failed computation in an action\
|
||||
\ whose effect may be observed even though the computation failed.\
|
||||
\ It's also possible that you're using an interpreter\
|
||||
\ that uses 'weave' improperly.\
|
||||
\ See documentation for more information."
|
||||
|
@ -7,3 +7,18 @@ module Polysemy.Internal.Fixpoint where
|
||||
data Fixpoint m a where
|
||||
Fixpoint :: (a -> m a) -> Fixpoint m a
|
||||
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
-- | The error used in 'Polysemy.Fixpoint.runFixpoint' and
|
||||
-- 'Polysemy.Fixpoint.runFixpointM' when the result of a failed computation
|
||||
-- is recursively used and somehow visible. You may use this for your own
|
||||
-- 'Fixpoint' interpreters. The argument should be the name of the interpreter.
|
||||
bomb :: String -> a
|
||||
bomb str = error $
|
||||
str ++ ": Internal computation failed.\
|
||||
\ This is likely because you have tried to recursively use\
|
||||
\ the result of a failed computation in an action\
|
||||
\ whose effect may be observed even though the computation failed.\
|
||||
\ It's also possible that you're using an interpreter\
|
||||
\ that uses 'weave' improperly.\
|
||||
\ See documentation for more information."
|
||||
|
Loading…
Reference in New Issue
Block a user