{-# LANGUAGE CPP #-}
#if !defined(SAFE) && defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 704
#define UNSAFE
{-# LANGUAGE Unsafe #-}
#endif
module Data.Void.Unsafe
( unsafeVacuous
, unsafeVacuousM
) where
import Data.Void
#ifdef UNSAFE
import Unsafe.Coerce
#endif
unsafeVacuous :: Functor f => f Void -> f a
#ifdef UNSAFE
unsafeVacuous = unsafeCoerce
#else
unsafeVacuous = fmap absurd
#endif
unsafeVacuousM :: Monad m => m Void -> m a
#ifdef UNSAFE
unsafeVacuousM = unsafeCoerce
#else
unsafeVacuousM m = m >>= return . absurd
#endif