packages feed

void 0.5.12 → 0.7.4

raw patch · 11 files changed

Files

+ .ghci view
@@ -0,0 +1,1 @@+:set -isrc -idist/build/autogen -optP-include -optPdist/build/autogen/cabal_macros.h
+ .gitignore view
@@ -0,0 +1,34 @@+*#+*.hi+*.o+*~+.*.swo+.*.swp+.swp+.DS_Store+TAGS+_darcs+dist+docs+tags+wiki+wip+dist-newstyle/+.stack-work/+cabal-dev+*.chi+*.chs.h+*.dyn_o+*.dyn_hi+.hpc+.hsenv+.cabal-sandbox/+cabal.sandbox.config+*.prof+*.aux+*.hp+*.eventlog+cabal.project.local+cabal.project.local~+.HTF/+.ghc.environment.*
− .travis.yml
@@ -1,1 +0,0 @@-language: haskell
+ .vim.custom view
@@ -0,0 +1,31 @@+" Add the following to your .vimrc to automatically load this on startup++" if filereadable(".vim.custom")+"     so .vim.custom+" endif++function StripTrailingWhitespace()+  let myline=line(".")+  let mycolumn = col(".")+  silent %s/  *$//+  call cursor(myline, mycolumn)+endfunction++" enable syntax highlighting+syntax on++" search for the tags file anywhere between here and /+set tags=TAGS;/++" highlight tabs and trailing spaces+set listchars=tab:‗‗,trail:‗+set list++" f2 runs hasktags+map <F2> :exec ":!hasktags -x -c --ignore src"<CR><CR>++" strip trailing whitespace before saving+" au BufWritePre *.hs,*.markdown silent! cal StripTrailingWhitespace()++" rebuild hasktags after saving+au BufWritePost *.hs silent! :exec ":!hasktags -x -c --ignore src"
CHANGELOG.markdown view
@@ -1,3 +1,32 @@+0.7.4 [2025.12.08]+------------------+* Drop support for pre-8.0 versions of GHC.++0.7.3 [2019.05.10]+------------------+* Backport the `Lift Void` instance introduced in `template-haskell-2.15.0.0`.++0.7.2+-----+* Only depend on `deepseq`, `hashable`, and `semigroups` if using GHC 7.8 or earlier.+* Cleaned up spurious "redundant constraint" warnings on GHC 8+++0.7.1+-----+* Support `semigroups` 0.17 on older GHCs+* Backported `NFData`'s `semigroup` instance to older GHCs.++0.7+---+* adapt to `Data.Void` being moved into `base-4.8`+* `vacuousM` removed++0.6+---+* `instance Exception Void`+* `instance Generic Void`+* `instance Hashable Void`+ 0.5.12 ------ * Fixed compatibility with GHC 7.2 (#6)
− Data/Void.hs
@@ -1,76 +0,0 @@-{-# LANGUAGE CPP #-}--------------------------------------------------------------------------------- |--- Module      :  Data.Void--- Copyright   :  (C) 2008-2011 Edward Kmett--- License     :  BSD-style (see the file LICENSE)------ Maintainer  :  Edward Kmett <ekmett@gmail.com>--- Stability   :  provisional--- Portability :  portable---------------------------------------------------------------------------------module Data.Void-  ( Void-  , absurd-  , vacuous-  , vacuousM-  ) where--import Data.Ix-import Control.Monad (liftM)-import Data.Semigroup (Semigroup(..))--#ifdef LANGUAGE_DeriveDataTypeable-import Data.Data-#endif---- | A logically uninhabited data type.-#if __GLASGOW_HASKELL__ < 700-data Void = Void !Void-#else-newtype Void = Void Void-#endif-#ifdef LANGUAGE_DeriveDataTypeable-  deriving (Data, Typeable)-#endif--instance Eq Void where-  _ == _ = True--instance Ord Void where-  compare _ _ = EQ--instance Show Void where-  showsPrec _ = absurd---- | Reading a 'Void' value is always a parse error, considering 'Void' as--- a data type with no constructors.-instance Read Void where-  readsPrec _ _ = []---- | Since 'Void' values logically don't exist, this witnesses the logical--- reasoning tool of \"ex falso quodlibet\".-absurd :: Void -> a-absurd a = a `seq` spin a where-   spin (Void b) = spin b---- | If 'Void' is uninhabited then any 'Functor' that holds only values of type 'Void'--- is holding no values.-vacuous :: Functor f => f Void -> f a-vacuous = fmap absurd---- | If 'Void' is uninhabited then any 'Monad' that holds values of type 'Void'--- is holding no values.-vacuousM :: Monad m => m Void -> m a-vacuousM = liftM absurd--instance Semigroup Void where-  a <> _ = a-  times1p _ a = a--instance Ix Void where-  range _ = []-  index _ = absurd-  inRange _ = absurd-  rangeSize _ = 0
− Data/Void/Unsafe.hs
@@ -1,48 +0,0 @@-{-# LANGUAGE CPP #-}-#if !defined(SAFE) && defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 704-#define UNSAFE-{-# LANGUAGE Unsafe #-}-#endif--------------------------------------------------------------------------------- |--- Module      :  Data.Void.Unsafe--- Copyright   :  (C) 2008-2012 Edward Kmett--- License     :  BSD-style (see the file LICENSE)------ Maintainer  :  Edward Kmett <ekmett@gmail.com>--- Stability   :  provisional--- Portability :  portable---------------------------------------------------------------------------------module Data.Void.Unsafe-  ( unsafeVacuous-  , unsafeVacuousM-  ) where--import Data.Void--#ifdef UNSAFE-import Unsafe.Coerce-#endif---- | If 'Void' is uninhabited than any 'Functor' that holds only values of the type 'Void'--- is holding no values.------ This is only safe for valid functors that do not perform GADT-like analysis on the argument.-unsafeVacuous :: Functor f => f Void -> f a-#ifdef UNSAFE-unsafeVacuous = unsafeCoerce-#else-unsafeVacuous = fmap absurd-#endif---- | If 'Void' is uninhabited then any 'Monad' that holds values of type 'Void'--- is holding no values.------ This is only safe for valid monads that do not perform GADT-like analysis on the argument.-unsafeVacuousM :: Monad m => m Void -> m a-#ifdef UNSAFE-unsafeVacuousM = unsafeCoerce-#else-unsafeVacuousM m = m >>= return . absurd-#endif
LICENSE view
@@ -1,4 +1,4 @@-Copyright 2011 Edward Kmett+Copyright 2015 Edward Kmett  All rights reserved. 
README.markdown view
@@ -1,7 +1,7 @@ void ==== -[![Build Status](https://secure.travis-ci.org/ekmett/void.png?branch=master)](http://travis-ci.org/ekmett/void)+[![Hackage](https://img.shields.io/hackage/v/void.svg)](https://hackage.haskell.org/package/void) [![Build Status](https://github.com/ekmett/void/workflows/Haskell-CI/badge.svg)](https://github.com/ekmett/void/actions?query=workflow%3AHaskell-CI)  This package provides a canonical 'uninhabited' data type for Haskell. This arises in a surprisingly wide array of situations in practice. 
+ src/Data/Void/Unsafe.hs view
@@ -0,0 +1,48 @@+{-# LANGUAGE CPP #-}+#if !defined(SAFE) && defined(__GLASGOW_HASKELL__)+#define UNSAFE+{-# LANGUAGE Unsafe #-}+#endif+{-# OPTIONS_GHC -Wno-redundant-constraints #-} -- they aren't redundant!+-----------------------------------------------------------------------------+-- |+-- Copyright   :  (C) 2008-2015 Edward Kmett+-- License     :  BSD-style (see the file LICENSE)+--+-- Maintainer  :  Edward Kmett <ekmett@gmail.com>+-- Stability   :  provisional+-- Portability :  portable+--+----------------------------------------------------------------------------+module Data.Void.Unsafe+  ( unsafeVacuous+  , unsafeVacuousM+  ) where++import Data.Void++#ifdef UNSAFE+import Unsafe.Coerce+#endif++-- | If 'Void' is uninhabited then any 'Functor' that holds only values of the type 'Void'+-- is holding no values.+--+-- This is only safe for valid functors that do not perform GADT-like analysis on the argument.+unsafeVacuous :: Functor f => f Void -> f a+#ifdef UNSAFE+unsafeVacuous = unsafeCoerce+#else+unsafeVacuous = fmap absurd+#endif++-- | If 'Void' is uninhabited then any 'Monad' that holds values of type 'Void'+-- is holding no values.+--+-- This is only safe for valid monads that do not perform GADT-like analysis on the argument.+unsafeVacuousM :: Monad m => m Void -> m a+#ifdef UNSAFE+unsafeVacuousM = unsafeCoerce+#else+unsafeVacuousM m = m >>= return . absurd+#endif
void.cabal view
@@ -1,43 +1,56 @@ name:          void category:      Data Structures-version:       0.5.12+version:       0.7.4 license:       BSD3-cabal-version: >= 1.6+cabal-version: >= 1.10 license-file:  LICENSE author:        Edward A. Kmett maintainer:    Edward A. Kmett <ekmett@gmail.com> stability:     portable homepage:      http://github.com/ekmett/void bug-reports:   http://github.com/ekmett/void/issues-copyright:     Copyright (C) 2008-2012 Edward A. Kmett+copyright:     Copyright (C) 2008-2015 Edward A. Kmett synopsis:      A Haskell 98 logically uninhabited data type description:   A Haskell 98 logically uninhabited data type, used to indicate that a given term should not exist. build-type:    Simple+tested-with:   GHC==9.12.2+             , GHC==9.10.3+             , GHC==9.8.4+             , GHC==9.6.6+             , GHC==9.4.8+             , GHC==9.2.8+             , GHC==9.0.2+             , GHC==8.10.7+             , GHC==8.8.4+             , GHC==8.6.5+             , GHC==8.4.4+             , GHC==8.2.2+             , GHC==8.0.2 -extra-source-files: .travis.yml CHANGELOG.markdown README.markdown+extra-source-files:+  .ghci+  .gitignore+  .vim.custom+  CHANGELOG.markdown+  README.markdown  source-repository head   type: git-  location: git://github.com/ekmett/void.git+  location: https://github.com/ekmett/void.git  flag safe   manual: True   default: False  library+  default-language: Haskell98+  hs-source-dirs: src   exposed-modules:-    Data.Void     Data.Void.Unsafe -  build-depends:-    base       >= 3 && < 10,-    semigroups >= 0.8.2+  build-depends: base >= 3 && < 10    ghc-options: -Wall    if flag(safe)     cpp-options: -DSAFE--  if impl(ghc)-    extensions: DeriveDataTypeable-    cpp-options: -DLANGUAGE_DeriveDataTypeable