packages feed

void 0.5.3 → 0.5.4

raw patch · 2 files changed

+15/−2 lines, 2 files

Files

Data/Void.hs view
@@ -10,14 +10,19 @@ -- Portability :  portable -- -----------------------------------------------------------------------------module Data.Void (Void, absurd) where+module Data.Void (Void, absurd, vacuous) where  import Data.Semigroup (Semigroup(..)) import Data.Ix+ #ifdef LANGUAGE_DeriveDataTypeable import Data.Data #endif +#ifdef GLASGOW_HASKELL+import Unsafe.Coerce+#endif+ #if GLASGOW_HASKELL < 700 data Void = Void !Void  #else@@ -34,6 +39,14 @@ -- reasoning tool of 'ex falso quodlibet'. absurd :: Void -> a absurd (Void a) = absurd a++vacuous :: Functor f => f Void -> f a+#ifdef GLASGOW_HASKELL+vacuous = unsafeCoerce+#else+-- other haskell compilers are free to use less homogeneous representations+vacuous = fmap absurd+#endif  instance Semigroup Void where   a <> _ = a
void.cabal view
@@ -1,6 +1,6 @@ name:          void category:      Data Structures-version:       0.5.3+version:       0.5.4 license:       BSD3 cabal-version: >= 1.6 license-file:  LICENSE