void-0.7.4/0000755000000000000000000000000007346545000010654 5ustar0000000000000000void-0.7.4/.ghci0000644000000000000000000000012507346545000011565 0ustar0000000000000000:set -isrc -idist/build/autogen -optP-include -optPdist/build/autogen/cabal_macros.h void-0.7.4/.gitignore0000644000000000000000000000044507346545000012647 0ustar0000000000000000*# *.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.* void-0.7.4/.vim.custom0000644000000000000000000000137707346545000012771 0ustar0000000000000000" 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 :exec ":!hasktags -x -c --ignore src" " 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" void-0.7.4/CHANGELOG.markdown0000644000000000000000000000136307346545000013712 0ustar00000000000000000.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) * Added `CHANGELOG.markdown` and `README.markdown` void-0.7.4/LICENSE0000644000000000000000000000265307346545000011667 0ustar0000000000000000Copyright 2015 Edward Kmett All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the author nor the names of his contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. void-0.7.4/README.markdown0000644000000000000000000000112507346545000013354 0ustar0000000000000000void ==== [![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. Contact Information ------------------- Contributions and bug reports are welcome! Please feel free to contact me through github or on the #haskell IRC channel on irc.freenode.net. -Edward Kmett void-0.7.4/Setup.lhs0000644000000000000000000000016507346545000012466 0ustar0000000000000000#!/usr/bin/runhaskell > module Main (main) where > import Distribution.Simple > main :: IO () > main = defaultMain void-0.7.4/src/Data/Void/0000755000000000000000000000000007346545000013215 5ustar0000000000000000void-0.7.4/src/Data/Void/Unsafe.hs0000644000000000000000000000254407346545000014777 0ustar0000000000000000{-# 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 -- 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-0.7.4/void.cabal0000644000000000000000000000251107346545000012600 0ustar0000000000000000name: void category: Data Structures version: 0.7.4 license: BSD3 cabal-version: >= 1.10 license-file: LICENSE author: Edward A. Kmett maintainer: Edward A. Kmett stability: portable homepage: http://github.com/ekmett/void bug-reports: http://github.com/ekmett/void/issues 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: .ghci .gitignore .vim.custom CHANGELOG.markdown README.markdown source-repository head type: 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.Unsafe build-depends: base >= 3 && < 10 ghc-options: -Wall if flag(safe) cpp-options: -DSAFE