packages feed

void 0.7.3 → 0.7.4

raw patch · 6 files changed

+18/−337 lines, 6 filesdep −deepseqdep −ghc-primdep −hashable

Dependencies removed: deepseq, ghc-prim, hashable, semigroups, template-haskell

Files

− .travis.yml
@@ -1,174 +0,0 @@-# This Travis job script has been generated by a script via-#-#   haskell-ci '--output=.travis.yml' '--config=cabal.haskell-ci' 'cabal.project'-#-# For more information, see https://github.com/haskell-CI/haskell-ci-#-# version: 0.3.20190425-#-language: c-dist: xenial-git:-  # whether to recursively clone submodules-  submodules: false-notifications:-  irc:-    channels:-      - irc.freenode.org#haskell-lens-    skip_join: true-    template:-      - "\"\\x0313void\\x03/\\x0306%{branch}\\x03 \\x0314%{commit}\\x03 %{build_url} %{message}\""-cache:-  directories:-    - $HOME/.cabal/packages-    - $HOME/.cabal/store-before_cache:-  - rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log-  # remove files that are regenerated by 'cabal update'-  - rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.*-  - rm -fv $CABALHOME/packages/hackage.haskell.org/*.json-  - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache-  - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar-  - rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx-  - rm -rfv $CABALHOME/packages/head.hackage-matrix:-  include:-    - compiler: ghc-8.8.1-      addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.8.1","cabal-install-3.0"]}}-      env: GHCHEAD=true-    - compiler: ghc-8.6.5-      addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.6.5","cabal-install-2.4"]}}-    - compiler: ghc-8.4.4-      addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.4.4","cabal-install-2.4"]}}-    - compiler: ghc-8.2.2-      addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.2.2","cabal-install-2.4"]}}-    - compiler: ghc-8.0.2-      addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-8.0.2","cabal-install-2.4"]}}-    - compiler: ghc-7.10.3-      addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.10.3","cabal-install-2.4"]}}-    - compiler: ghc-7.8.4-      addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.8.4","cabal-install-2.4"]}}-    - compiler: ghc-7.6.3-      addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.6.3","cabal-install-2.4"]}}-    - compiler: ghc-7.4.2-      addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.4.2","cabal-install-2.4"]}}-    - compiler: ghc-7.2.2-      addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.2.2","cabal-install-2.4"]}}-    - compiler: ghc-7.0.4-      addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-7.0.4","cabal-install-2.4"]}}-    - compiler: ghc-head-      addons: {"apt":{"sources":["hvr-ghc"],"packages":["ghc-head","cabal-install-head"]}}-      env: GHCHEAD=true-  allow_failures:-    - compiler: ghc-head-    - compiler: ghc-8.8.1-before_install:-  - HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')-  - HCPKG="$HC-pkg"-  - unset CC-  - CABAL=/opt/ghc/bin/cabal-  - CABALHOME=$HOME/.cabal-  - export PATH="$CABALHOME/bin:$PATH"-  - TOP=$(pwd)-  - HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))-  - echo $HCNUMVER-  - CABAL="$CABAL -vnormal+nowrap+markoutput"-  - set -o pipefail-  - |-    echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }'           >> .colorful.awk-    echo 'BEGIN { state = "output"; }'                                     >> .colorful.awk-    echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }'            >> .colorful.awk-    echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }'             >> .colorful.awk-    echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk-    echo '  if (state == "cabal") {'                                       >> .colorful.awk-    echo '    print blue($0)'                                              >> .colorful.awk-    echo '  } else {'                                                      >> .colorful.awk-    echo '    print $0'                                                    >> .colorful.awk-    echo '  }'                                                             >> .colorful.awk-    echo '}'                                                               >> .colorful.awk-  - cat .colorful.awk-  - |-    color_cabal_output () {-      awk -f $TOP/.colorful.awk-    }-  - echo text | color_cabal_output-install:-  - ${CABAL} --version-  - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"-  - TEST=--enable-tests-  - BENCH=--enable-benchmarks-  - GHCHEAD=${GHCHEAD-false}-  - rm -f $CABALHOME/config-  - |-    echo "verbose: normal +nowrap +markoutput"          >> $CABALHOME/config-    echo "remote-build-reporting: anonymous"            >> $CABALHOME/config-    echo "remote-repo-cache: $CABALHOME/packages"       >> $CABALHOME/config-    echo "logs-dir:          $CABALHOME/logs"           >> $CABALHOME/config-    echo "world-file:        $CABALHOME/world"          >> $CABALHOME/config-    echo "extra-prog-path:   $CABALHOME/bin"            >> $CABALHOME/config-    echo "symlink-bindir:    $CABALHOME/bin"            >> $CABALHOME/config-    echo "installdir:        $CABALHOME/bin"            >> $CABALHOME/config-    echo "build-summary:     $CABALHOME/logs/build.log" >> $CABALHOME/config-    echo "store-dir:         $CABALHOME/store"          >> $CABALHOME/config-    echo "install-dirs user"                            >> $CABALHOME/config-    echo "  prefix: $CABALHOME"                         >> $CABALHOME/config-    echo "repository hackage.haskell.org"               >> $CABALHOME/config-    echo "  url: http://hackage.haskell.org/"           >> $CABALHOME/config-  - |-    if $GHCHEAD; then-    echo "allow-newer: $($HCPKG list --simple-output | sed -E 's/([a-zA-Z-]+)-[0-9.]+/*:\1/g')" >> $CABALHOME/config-    -    echo "repository head.hackage"                                                        >> $CABALHOME/config-    echo "   url: http://head.hackage.haskell.org/"                                       >> $CABALHOME/config-    echo "   secure: True"                                                                >> $CABALHOME/config-    echo "   root-keys: 07c59cb65787dedfaef5bd5f987ceb5f7e5ebf88b904bbd4c5cbdeb2ff71b740" >> $CABALHOME/config-    echo "              2e8555dde16ebd8df076f1a8ef13b8f14c66bad8eafefd7d9e37d0ed711821fb" >> $CABALHOME/config-    echo "              8f79fd2389ab2967354407ec852cbe73f2e8635793ac446d09461ffb99527f6e" >> $CABALHOME/config-    echo "   key-threshold: 3"                                                            >> $CABALHOME/config-    fi-  - cat $CABALHOME/config-  - rm -fv cabal.project cabal.project.local cabal.project.freeze-  - travis_retry ${CABAL} v2-update -v-  # Generate cabal.project-  - rm -rf cabal.project cabal.project.local cabal.project.freeze-  - touch cabal.project-  - |-    echo 'packages: "."' >> cabal.project-  - |-    echo "write-ghc-environment-files: always" >> cabal.project-  - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(void)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"-  - cat cabal.project || true-  - cat cabal.project.local || true-  - if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi-  - ${CABAL} v2-freeze -w ${HC} ${TEST} ${BENCH} | color_cabal_output-  - "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"-  - rm  cabal.project.freeze-  - ${CABAL} v2-build -w ${HC} ${TEST} ${BENCH} --dep -j2 all | color_cabal_output-script:-  - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)-  # Packaging...-  - ${CABAL} v2-sdist all | color_cabal_output-  # Unpacking...-  - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/-  - cd ${DISTDIR} || false-  - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;-  # Generate cabal.project-  - rm -rf cabal.project cabal.project.local cabal.project.freeze-  - touch cabal.project-  - |-    echo 'packages: "void-*/*.cabal"' >> cabal.project-  - |-    echo "write-ghc-environment-files: always" >> cabal.project-  - "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(void)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"-  - cat cabal.project || true-  - cat cabal.project.local || true-  # Building with tests and benchmarks...-  # build & run tests, build benchmarks-  - ${CABAL} v2-build -w ${HC} ${TEST} ${BENCH} all | color_cabal_output-  # cabal check...-  - (cd void-* && ${CABAL} -vnormal check)-  # haddock...-  - ${CABAL} v2-haddock -w ${HC} ${TEST} ${BENCH} all | color_cabal_output--# REGENDATA ["--output=.travis.yml","--config=cabal.haskell-ci","cabal.project"]-# EOF
CHANGELOG.markdown view
@@ -1,3 +1,7 @@+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`.
README.markdown view
@@ -1,7 +1,7 @@ void ==== -[![Hackage](https://img.shields.io/hackage/v/void.svg)](https://hackage.haskell.org/package/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-old/Data/Void.hs
@@ -1,129 +0,0 @@-{-# LANGUAGE CPP #-}-#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702-{-# LANGUAGE Trustworthy #-}-#endif--#ifdef LANGUAGE_DeriveDataTypeable-{-# LANGUAGE DeriveDataTypeable #-}-#endif--#ifdef LANGUAGE_DeriveGeneric-{-# LANGUAGE DeriveGeneric #-}-{-# LANGUAGE StandaloneDeriving #-}-#endif--#ifndef MIN_VERSION_base-#define MIN_VERSION_base(x,y,z) 1-#endif--#ifndef MIN_VERSION_semigroups-#define MIN_VERSION_semigroups(x,y,z) 1-#endif--------------------------------------------------------------------------------- |--- 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-  ( Void-  , absurd-  , vacuous-  , vacuousM-  ) where--import Control.DeepSeq (NFData(..))-import Control.Monad (liftM)-import Data.Ix-import Data.Hashable-import Data.Semigroup (Semigroup(..))--#ifdef LANGUAGE_DeriveDataTypeable-import Data.Data-#endif--#ifdef LANGUAGE_DeriveGeneric-import GHC.Generics-#endif--#if MIN_VERSION_base(4,0,0)-import Control.Exception-#endif--import Language.Haskell.TH.Syntax (Lift (..))---- | 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--#ifdef LANGUAGE_DeriveGeneric-deriving instance Generic Void-#endif--instance Eq Void where-  _ == _ = True--instance Hashable Void where-  hashWithSalt _ = absurd--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-#if MIN_VERSION_semigroups(0,17,0)-  stimes _ a = a-#else-  times1p _ a = a-#endif--instance Ix Void where-  range _ = []-  index _ = absurd-  inRange _ = absurd-  rangeSize _ = 0--#if MIN_VERSION_base(4,0,0)-instance Exception Void-#endif---- | Defined as @'rnf' = 'absurd'@.-instance NFData Void where-  rnf = absurd--instance Lift Void where-  lift = return . absurd
src/Data/Void/Unsafe.hs view
@@ -1,11 +1,9 @@ {-# LANGUAGE CPP #-}-#if !defined(SAFE) && defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 704+#if !defined(SAFE) && defined(__GLASGOW_HASKELL__) #define UNSAFE {-# LANGUAGE Unsafe #-} #endif-#if __GLASGOW_HASKELL__ >= 800 {-# OPTIONS_GHC -Wno-redundant-constraints #-} -- they aren't redundant!-#endif ----------------------------------------------------------------------------- -- | -- Copyright   :  (C) 2008-2015 Edward Kmett@@ -27,7 +25,7 @@ import Unsafe.Coerce #endif --- | If 'Void' is uninhabited than any 'Functor' that holds only values of the type 'Void'+-- | 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.
void.cabal view
@@ -1,6 +1,6 @@ name:          void category:      Data Structures-version:       0.7.3+version:       0.7.4 license:       BSD3 cabal-version: >= 1.10 license-file:  LICENSE@@ -13,29 +13,30 @@ 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==8.8.1+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-             , GHC==7.10.3-             , GHC==7.8.4-             , GHC==7.6.3-             , GHC==7.4.2-             , GHC==7.2.2-             , GHC==7.0.4  extra-source-files:   .ghci   .gitignore-  .travis.yml   .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@@ -53,22 +54,3 @@    if flag(safe)     cpp-options: -DSAFE--  if !impl(ghc>=7.9)-    hs-source-dirs: src-old-    exposed-modules: Data.Void-    build-depends:-      deepseq    >= 1.1 && < 1.5,-      hashable   >= 1.1,-      semigroups >= 0.8.2,-      template-haskell >=2.5.0.0 && <2.11--    if impl(ghc)-      other-extensions: DeriveDataTypeable-      cpp-options: -DLANGUAGE_DeriveDataTypeable--    if impl(ghc >= 7.2)-      other-extensions: StandaloneDeriving-      -- other-extensions: DeriveGeneric isn't known to cabal yet-      cpp-options: -DLANGUAGE_DeriveGeneric-      build-depends: ghc-prim