Skip to content
Snippets Groups Projects
Commit 87a57146 authored by Jens Nolte's avatar Jens Nolte
Browse files

Change impossibleCodePathM to require MonadThrow


Co-authored-by: default avatarJan Beinke <git@janbeinke.com>
parent 0ffa3883
No related branches found
No related tags found
No related merge requests found
......@@ -8,6 +8,7 @@ import Prelude
import Control.Applicative (liftA2)
import Control.Concurrent (threadDelay)
import Control.Monad.Catch (MonadThrow, throwM)
import Control.Monad.State.Lazy as State
import Data.Char qualified as Char
import Data.HashMap.Strict qualified as HM
......@@ -24,8 +25,8 @@ import Quasar.Utils.ExtraT
impossibleCodePath :: GHC.Stack.Types.HasCallStack => a
impossibleCodePath = error "Code path marked as impossible was reached"
impossibleCodePathM :: MonadFail m => m a
impossibleCodePathM = fail "Code path marked as impossible was reached"
impossibleCodePathM :: MonadThrow m => m a
impossibleCodePathM = throwM (userError "Code path marked as impossible was reached")
intercalate :: (Foldable f, Monoid a) => a -> f a -> a
intercalate inter = foldr1 (\a b -> a <> inter <> b)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment