Skip to content

Commit

Permalink
avoid warning for absurdU with cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
tek committed May 25, 2024
1 parent eac24b8 commit efb9566
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Polysemy/Internal/Union.hs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,11 @@ extract (Union (There _) _) = error "Unsafe use of UnsafeMkElemOf"
------------------------------------------------------------------------------
-- | An empty union contains nothing, so this function is uncallable.
absurdU :: Union '[] m a -> b
absurdU (Union _ _) = error "Unsafe use of UnsafeMkElemOf"
#if __GLASGOW_HASKELL__ >= 902
absurdU = \case
#else
absurdU _ = error "Unsafe use of UnsafeMkElemOf"
#endif


------------------------------------------------------------------------------
Expand Down

0 comments on commit efb9566

Please sign in to comment.