Commit 29352158 authored by Ryan Scott's avatar Ryan Scott Committed by Herbert Valerio Riedel

Even more GHC 8.8-related patches

This adds some new patches, removes some patches for old packages,
and migrates some patches to newer releases of the same libraries.
parent a543fdcc
diff -ru EdisonAPI-1.3.1.orig/src/Data/Edison/Seq/ListSeq.hs EdisonAPI-1.3.1/src/Data/Edison/Seq/ListSeq.hs
--- EdisonAPI-1.3.1.orig/src/Data/Edison/Seq/ListSeq.hs 2016-06-03 00:49:51.000000000 -0400
+++ EdisonAPI-1.3.1/src/Data/Edison/Seq/ListSeq.hs 2019-04-19 13:54:07.461113622 -0400
@@ -131,25 +131,25 @@
rcons x s = s ++ [x]
append = (++)
-lview [] = fail "ListSeq.lview: empty sequence"
+lview [] = error "ListSeq.lview: empty sequence"
lview (x:xs) = return (x, xs)
-lheadM [] = fail "ListSeq.lheadM: empty sequence"
+lheadM [] = error "ListSeq.lheadM: empty sequence"
lheadM (x:xs) = return x
lhead [] = error "ListSeq.lhead: empty sequence"
lhead (x:xs) = x
-ltailM [] = fail "ListSeq.ltailM: empty sequence"
+ltailM [] = error "ListSeq.ltailM: empty sequence"
ltailM (x:xs) = return xs
ltail [] = error "ListSeq.ltail: empty sequence"
ltail (x:xs) = xs
-rview [] = fail "ListSeq.rview: empty sequence"
+rview [] = error "ListSeq.rview: empty sequence"
rview xs = return (rhead xs, rtail xs)
-rheadM [] = fail "ListSeq.rheadM: empty sequence"
+rheadM [] = error "ListSeq.rheadM: empty sequence"
rheadM (x:xs) = rh x xs
where rh y [] = return y
rh y (x:xs) = rh x xs
@@ -159,7 +159,7 @@
where rh y [] = y
rh y (x:xs) = rh x xs
-rtailM [] = fail "ListSeq.rtailM: empty sequence"
+rtailM [] = error "ListSeq.rtailM: empty sequence"
rtailM (x:xs) = return (rt x xs)
where rt y [] = []
rt y (x:xs) = y : rt x xs
@@ -255,9 +255,9 @@
lookup i xs = ID.runIdentity (lookupM i xs)
lookupM i xs
- | i < 0 = fail "ListSeq.lookup: not found"
+ | i < 0 = error "ListSeq.lookup: not found"
| otherwise = case drop i xs of
- [] -> fail "ListSeq.lookup: not found"
+ [] -> error "ListSeq.lookup: not found"
(x:_) -> return x
lookupWithDefault d i xs
This diff is collapsed.
Name: QuickCheck
Version: 2.12.6.1
x-revision: 1
Cabal-Version: >= 1.8
Build-type: Simple
License: BSD3
License-file: LICENSE
Copyright: 2000-2018 Koen Claessen, 2006-2008 Björn Bringert, 2009-2018 Nick Smallbone
Author: Koen Claessen <koen@chalmers.se>
Maintainer: Nick Smallbone <nick@smallbone.se>
Bug-reports: https://github.com/nick8325/quickcheck/issues
Tested-with: GHC >= 7.0
Homepage: https://github.com/nick8325/quickcheck
Category: Testing
Synopsis: Automatic testing of Haskell programs
Description:
QuickCheck is a library for random testing of program properties.
The programmer provides a specification of the program, in the form of
properties which functions should satisfy, and QuickCheck then tests that the
properties hold in a large number of randomly generated cases.
Specifications are expressed in Haskell, using combinators provided by
QuickCheck. QuickCheck provides combinators to define properties, observe the
distribution of test data, and define test data generators.
.
Most of QuickCheck's functionality is exported by the main "Test.QuickCheck"
module. The main exception is the monadic property testing library in
"Test.QuickCheck.Monadic".
.
If you are new to QuickCheck, you can try looking at the following resources:
.
* The <http://www.cse.chalmers.se/~rjmh/QuickCheck/manual.html official QuickCheck manual>.
It's a bit out-of-date in some details and doesn't cover newer QuickCheck features,
but is still full of good advice.
* <https://begriffs.com/posts/2017-01-14-design-use-quickcheck.html>,
a detailed tutorial written by a user of QuickCheck.
.
The <http://hackage.haskell.org/package/quickcheck-instances quickcheck-instances>
companion package provides instances for types in Haskell Platform packages
at the cost of additional dependencies.
extra-source-files:
README
changelog
examples/Heap.hs
examples/Heap_Program.hs
examples/Heap_ProgramAlgebraic.hs
examples/Lambda.hs
examples/Merge.hs
examples/Set.hs
examples/Simple.hs
source-repository head
type: git
location: https://github.com/nick8325/quickcheck
source-repository this
type: git
location: https://github.com/nick8325/quickcheck
tag: 2.12.6.1
flag templateHaskell
Description: Build Test.QuickCheck.All, which uses Template Haskell.
Default: True
library
Build-depends: base >=4.3 && <5, random, containers, erf >= 2
-- Modules that are always built.
Exposed-Modules:
Test.QuickCheck,
Test.QuickCheck.Arbitrary,
Test.QuickCheck.Gen,
Test.QuickCheck.Gen.Unsafe,
Test.QuickCheck.Monadic,
Test.QuickCheck.Modifiers,
Test.QuickCheck.Property,
Test.QuickCheck.Test,
Test.QuickCheck.Text,
Test.QuickCheck.Poly,
Test.QuickCheck.State,
Test.QuickCheck.Random,
Test.QuickCheck.Exception,
Test.QuickCheck.Features
-- GHC-specific modules.
if impl(ghc)
Exposed-Modules: Test.QuickCheck.Function
Build-depends: transformers >= 0.3, deepseq >= 1.3.0.0 && < 1.5
else
cpp-options: -DNO_TRANSFORMERS -DNO_DEEPSEQ
if impl(ghc) && flag(templateHaskell)
Build-depends: template-haskell >= 2.4
Other-Extensions: TemplateHaskell
Exposed-Modules: Test.QuickCheck.All
else
cpp-options: -DNO_TEMPLATE_HASKELL
if !impl(ghc >= 7.4)
cpp-options: -DNO_CTYPES_CONSTRUCTORS -DNO_FOREIGN_C_USECONDS
-- The new generics appeared in GHC 7.2...
if impl(ghc < 7.2)
cpp-options: -DNO_GENERICS
-- ...but in 7.2-7.4 it lives in the ghc-prim package.
if impl(ghc >= 7.2) && impl(ghc < 7.6)
Build-depends: ghc-prim
-- Safe Haskell appeared in GHC 7.2, but GHC.Generics isn't safe until 7.4.
if impl (ghc < 7.4)
cpp-options: -DNO_SAFE_HASKELL
-- Use tf-random on newer GHCs.
if impl(ghc)
Build-depends: tf-random >= 0.4
else
cpp-options: -DNO_TF_RANDOM
if !impl(ghc >= 7.6)
cpp-options: -DNO_POLYKINDS
if !impl(ghc >= 8.0)
cpp-options: -DNO_MONADFAIL
-- Switch off most optional features on non-GHC systems.
if !impl(ghc)
-- If your Haskell compiler can cope without some of these, please
-- send a message to the QuickCheck mailing list!
cpp-options: -DNO_TIMEOUT -DNO_NEWTYPE_DERIVING -DNO_GENERICS -DNO_TEMPLATE_HASKELL -DNO_SAFE_HASKELL -DNO_TYPEABLE
if !impl(hugs) && !impl(uhc)
cpp-options: -DNO_ST_MONAD -DNO_MULTI_PARAM_TYPE_CLASSES
-- LANGUAGE pragmas don't have any effect in Hugs.
if impl(hugs)
Extensions: CPP
if impl(uhc)
-- Cabal under UHC needs pointing out all the dependencies of the
-- random package.
Build-depends: old-time, old-locale
-- Plus some bits of the standard library are missing.
cpp-options: -DNO_FIXED -DNO_EXCEPTIONS
Test-Suite test-quickcheck
type: exitcode-stdio-1.0
hs-source-dirs:
examples
main-is: Heap.hs
build-depends: base, QuickCheck
if !flag(templateHaskell)
Buildable: False
Test-Suite test-quickcheck-gcoarbitrary
type: exitcode-stdio-1.0
hs-source-dirs: tests
main-is: GCoArbitraryExample.hs
build-depends: base, QuickCheck
if !impl(ghc >= 7.2)
buildable: False
if impl(ghc >= 7.2) && impl(ghc < 7.6)
build-depends: ghc-prim
Test-Suite test-quickcheck-generators
type: exitcode-stdio-1.0
hs-source-dirs: tests
main-is: Generators.hs
build-depends: base, QuickCheck
if !flag(templateHaskell)
Buildable: False
Test-Suite test-quickcheck-gshrink
type: exitcode-stdio-1.0
hs-source-dirs: tests
main-is: GShrinkExample.hs
build-depends: base, QuickCheck
if !impl(ghc >= 7.2)
buildable: False
if impl(ghc >= 7.2) && impl(ghc < 7.6)
build-depends: ghc-prim
Test-Suite test-quickcheck-terminal
type: exitcode-stdio-1.0
hs-source-dirs: tests
main-is: Terminal.hs
build-depends: base, process, deepseq >= 1.3.0.0 && < 1.5, QuickCheck
if !impl(ghc >= 7.10)
buildable: False
Test-Suite test-quickcheck-monadfix
type: exitcode-stdio-1.0
hs-source-dirs: tests
main-is: MonadFix.hs
build-depends: base, QuickCheck
if !impl(ghc >= 7.10)
buildable: False
commit adb362245f00d9f7ed873c8c7106614d7aa6c27e
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Fri Mar 15 10:45:56 2019 -0400
Adapt to base-4.13.0.0
diff --git a/Test/QuickCheck/Monadic.hs b/Test/QuickCheck/Monadic.hs
index a8f3043..23153f2 100644
--- a/Test/QuickCheck/Monadic.hs
+++ b/Test/QuickCheck/Monadic.hs
@@ -123,7 +123,9 @@ instance Applicative (PropertyM m) where
instance Monad m => Monad (PropertyM m) where
return = pure
(>>=) = bind
+#if !defined(NO_MONADFAIL) && !(MIN_VERSION_base(4,13,0))
fail = fail_
+#endif
#ifndef NO_MONADFAIL
instance Monad m => Fail.MonadFail (PropertyM m) where
name: STMonadTrans
version: 0.4.3
x-revision: 1
cabal-version: >= 1.8
license: BSD3
license-file: LICENSE
author: Josef Svenningsson
maintainer: josef.svenningsson@gmail.com
category: Monads
build-type: Simple
synopsis: A monad transformer version of the ST monad
description:
A monad transformer version of the ST monad
Warning! This monad transformer should not be used with monads that
can contain multiple answers, like the list monad. The reason is that
the state token will be duplicated across the different answers and
this causes Bad Things to happen (such as loss of referential
transparency). Safe monads include the monads State, Reader, Writer,
Maybe and combinations of their corresponding monad transformers.
extra-source-files:
changelog.md
source-repository head
type: git
location: https://github.com/josefs/STMonadTrans
flag splitBase
description: Choose the new smaller, split-up base package.
library
build-depends: base >= 4.6
if flag(splitBase)
build-depends: base >= 3, base < 5, mtl, array
else
build-depends: base < 3
exposed-modules:
Control.Monad.ST.Trans,
Control.Monad.ST.Trans.Internal
extensions: CPP, MagicHash, UnboxedTuples, Rank2Types, FlexibleInstances,
MultiParamTypeClasses, UndecidableInstances
Test-Suite foo
type: detailed-0.9
hs-source-dirs: test
test-module: Test
build-depends: STMonadTrans, base, mtl, array, Cabal
diff -ru STMonadTrans-0.4.3.orig/Control/Monad/ST/Trans/Internal.hs STMonadTrans-0.4.3/Control/Monad/ST/Trans/Internal.hs
--- STMonadTrans-0.4.3.orig/Control/Monad/ST/Trans/Internal.hs 2017-02-09 08:18:16.000000000 -0500
+++ STMonadTrans-0.4.3/Control/Monad/ST/Trans/Internal.hs 2019-04-19 13:40:49.646093718 -0400
@@ -1,5 +1,5 @@
{-# LANGUAGE MagicHash, UnboxedTuples, Rank2Types, FlexibleInstances,
- MultiParamTypeClasses, UndecidableInstances, RecursiveDo #-}
+ MultiParamTypeClasses, UndecidableInstances, RecursiveDo, CPP #-}
{- |
Module : Control.Monad.ST.Trans
Copyright : Josef Svenningsson 2008-2010
@@ -26,6 +26,7 @@
import GHC.Base
import GHC.ST hiding (liftST)
+import qualified Control.Monad.Fail as Fail
import Control.Monad.Fix
import Control.Monad.Trans
import Control.Monad.Error.Class
@@ -69,7 +70,12 @@
case ret of
STTRet new_st a ->
unSTT (k a) new_st
+#if !(MIN_VERSION_base(4,13,0))
fail msg = lift (fail msg)
+#endif
+
+instance Fail.MonadFail m => Fail.MonadFail (STT s m) where
+ fail msg = lift (Fail.fail msg)
instance MonadTrans (STT s) where
lift m = STT $ \st ->
name: cheapskate
version: 0.1.1.1
x-revision: 1
synopsis: Experimental markdown processor.
description: This is an experimental Markdown processor in pure
Haskell. It aims to process Markdown efficiently and in
the most forgiving possible way. It is designed to deal
with any input, including garbage, with linear
performance. Output is sanitized by default for
protection against XSS attacks.
.
Several markdown extensions are implemented, including
fenced code blocks, significant list start numbers, and
autolinked URLs. See README.markdown for details.
homepage: http://github.com/jgm/cheapskate
license: BSD3
license-file: LICENSE
author: John MacFarlane
maintainer: jgm@berkeley.edu
copyright: (C) 2012-2013 John MacFarlane
category: Text
build-type: Simple
extra-source-files: README.markdown
changelog
man/man1/cheapskate.1
cabal-version: >=1.10
Source-repository head
type: git
location: git://github.com/jgm/cheapskate.git
Flag dingus
Description: Build cheapskate-dingus cgi script.
Default: False
library
hs-source-dirs: .
exposed-modules: Cheapskate
Cheapskate.Parse
Cheapskate.Types
Cheapskate.Html
other-modules: Cheapskate.Util
Cheapskate.Inlines
Cheapskate.ParserCombinators
Paths_cheapskate
build-depends: base >=4.6 && <5,
containers >=0.4 && <0.7,
mtl >=2.1 && <2.3,
text >= 0.9 && < 1.3,
blaze-html >=0.6 && < 0.10,
xss-sanitize >= 0.3 && < 0.4,
data-default >= 0.5 && < 0.8,
syb,
uniplate >= 1.6 && < 1.7,
deepseq
default-language: Haskell2010
ghc-options: -Wall -fno-warn-unused-do-bind
executable cheapskate
main-is: main.hs
hs-source-dirs: bin
build-depends: base >=4.4 && <5,
cheapskate,
bytestring,
blaze-html >=0.6 && < 0.10,
text >= 0.9 && < 1.3
default-language: Haskell2010
ghc-options: -Wall -fno-warn-unused-do-bind
executable cheapskate-dingus
main-is: cheapskate-dingus.hs
hs-source-dirs: bin
if flag(dingus)
build-depends: base, aeson, cheapskate, blaze-html,
text, wai-extra, wai >= 0.3, http-types
default-language: Haskell2010
if flag(dingus)
Buildable: True
else
Buildable: False
ghc-options: -Wall -fno-warn-unused-do-bind
commit e0686e310c948fbcbde9e64421563c91a42dc0b3
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Fri Apr 19 09:25:00 2019 -0400
Adapt to base-4.13.0.0
diff --git a/Cheapskate/ParserCombinators.hs b/Cheapskate/ParserCombinators.hs
index d60699d..77efb09 100644
--- a/Cheapskate/ParserCombinators.hs
+++ b/Cheapskate/ParserCombinators.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
module Cheapskate.ParserCombinators (
Position(..)
, Parser
@@ -35,6 +36,7 @@ import Prelude hiding (takeWhile)
import Data.Text (Text)
import qualified Data.Text as T
import Control.Monad
+import qualified Control.Monad.Fail as Fail
import Control.Applicative
import qualified Data.Set as Set
@@ -109,7 +111,9 @@ instance Alternative Parser where
instance Monad Parser where
return x = Parser $ \st -> Right (st, x)
- fail e = Parser $ \st -> Left $ ParseError (position st) e
+#if !(MIN_VERSION_base(4,13,0))
+ fail = Fail.fail
+#endif
p >>= g = Parser $ \st ->
case evalParser p st of
Left e -> Left e
@@ -117,6 +121,9 @@ instance Monad Parser where
{-# INLINE return #-}
{-# INLINE (>>=) #-}
+instance Fail.MonadFail Parser where
+ fail e = Parser $ \st -> Left $ ParseError (position st) e
+
instance MonadPlus Parser where
mzero = Parser $ \st -> Left $ ParseError (position st) "(mzero)"
mplus p1 p2 = Parser $ \st ->
commit 779b484beeeba9e6c7229da672da9be5d618dc5d
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Fri Apr 19 15:31:27 2019 -0400
Adapt to base-4.13.0.0
diff --git a/src/Data/Equivalence/STT.hs b/src/Data/Equivalence/STT.hs
index 77cb9c2..c3a41c7 100644
--- a/src/Data/Equivalence/STT.hs
+++ b/src/Data/Equivalence/STT.hs
@@ -264,7 +264,7 @@ equateEntry Equiv {combDesc = mkDesc} repx@(Entry rx) repy@(Entry ry) =
writeSTRef ry dy{entryWeight = wx + wy, entryDesc = mkDesc chx chy}
return repy
- _ -> fail "error on `equateEntry`"
+ _ -> error "error on `equateEntry`"
else return repx
combineEntries :: (Monad m, Applicative m, Ord a)
Name: language-c
Version: 0.8.2
x-revision: 1
Cabal-Version: >= 1.8
Build-Type: Simple
License: BSD3
License-File: LICENSE
Copyright: LICENSE
Author: AUTHORS
Maintainer: benedikt.huber@gmail.com
Stability: experimental
Homepage: http://visq.github.io/language-c/
Bug-reports: https://github.com/visq/language-c/issues/
Synopsis: Analysis and generation of C code
Description: Language C is a haskell library for the analysis and generation of C code.
It features a complete, well tested parser and pretty printer for all of C99 and a large
set of C11 and clang/GNU extensions.
Category: Language
Tested-With: GHC == 7.8.*, GHC == 7.10.*, GHC == 8.0.*, GHC == 8.2.1
Extra-Source-Files: AUTHORS AUTHORS.c2hs ChangeLog README
src/Language/C/Parser/Lexer.x
src/Language/C/Parser/Parser.y
Source-Repository head
type: git
location: https://github.com/visq/language-c.git
Flag useByteStrings
Description: Use ByteString as InputStream datatype
Default: True
Flag separateSYB
description: Data.Generics available in separate package.
Flag allWarnings
Description: Turn on all warnings for building (development)
Default: False
Flag iecFpExtension
Description: Support IEC 60559 floating point extension (defines _Float128)
Default: True
Library
Extensions: CPP, DeriveDataTypeable, DeriveGeneric, PatternGuards, BangPatterns, ExistentialQuantification, GeneralizedNewtypeDeriving, ScopedTypeVariables
Build-Depends: base >= 3 && < 5,
array,
containers >= 0.3,
deepseq >= 1.4.0.0 && < 1.5,
directory,
filepath,
pretty < 1.2.0,
process
if flag(allWarnings)
if impl(ghc >= 8.0)
ghc-options: -Wall -Wno-redundant-constraints
else
ghc-options: -Wall
If flag(separateSYB)
Build-Depends:
base >=4.7 && <5,
syb
Else
Build-Depends:
base <4
if flag(useByteStrings)
Build-Depends: bytestring >= 0.9.0
else
cpp-options: -DNO_BYTESTRING
if flag(iecFpExtension)
cpp-options: -DIEC_60559_TYPES_EXT
-- GHC.Generics lived in `ghc-prim` for GHC 7.2 & GHC 7.4
if impl(ghc == 7.4.*)
build-depends: ghc-prim == 0.2.*
Build-Tools: happy, alex
Hs-Source-Dirs: src
Exposed-Modules:
-- top-level
Language.C
-- data
Language.C.Data
Language.C.Data.Position
Language.C.Data.Ident
Language.C.Data.Error
Language.C.Data.Name
Language.C.Data.Node
Language.C.Data.InputStream
-- syntax
Language.C.Syntax
Language.C.Syntax.AST
Language.C.Syntax.Constants
Language.C.Syntax.Ops
Language.C.Syntax.Utils
-- parser
Language.C.Parser
-- pretty printer
Language.C.Pretty
-- system
Language.C.System.Preprocess
Language.C.System.GCC
-- analysis [experimental]
Language.C.Analysis
Language.C.Analysis.ConstEval
Language.C.Analysis.Builtins
Language.C.Analysis.SemError
Language.C.Analysis.SemRep
Language.C.Analysis.DefTable
Language.C.Analysis.TravMonad
Language.C.Analysis.AstAnalysis
Language.C.Analysis.DeclAnalysis
Language.C.Analysis.Debug
Language.C.Analysis.TypeCheck
Language.C.Analysis.TypeConversions
Language.C.Analysis.TypeUtils
Language.C.Analysis.NameSpaceMap
-- semrep -> code [alpha]
Language.C.Analysis.Export
Other-Modules:
Language.C.Data.RList
-- parser implementation
Language.C.Parser.Builtin
Language.C.Parser.Lexer
Language.C.Parser.ParserMonad
Language.C.Parser.Tokens
Language.C.Parser.Parser
-- test description
Test-Suite language-c-harness
type: exitcode-stdio-1.0
main-is: test/harness/run-harness.hs
build-depends: base, language-c, directory, process, filepath
diff -ru language-c-0.8.2.orig/src/Language/C/Parser/ParserMonad.hs language-c-0.8.2/src/Language/C/Parser/ParserMonad.hs
--- language-c-0.8.2.orig/src/Language/C/Parser/ParserMonad.hs 2018-09-19 00:21:29.000000000 -0400
+++ language-c-0.8.2/src/Language/C/Parser/ParserMonad.hs 2019-04-19 16:43:53.153364757 -0400
@@ -48,6 +48,7 @@
import Control.Applicative (Applicative(..))
import Control.Monad (liftM, ap)
+import qualified Control.Monad.Fail as Fail
import Data.Set (Set)
import qualified Data.Set as Set (fromList, insert, member, delete)
@@ -82,8 +83,13 @@
instance Monad P where
return = returnP
(>>=) = thenP
- fail m = getPos >>= \pos -> failP pos [m]
+#if !(MIN_VERSION_base(4,13,0))
+ fail = Fail.fail
+#endif
+instance Fail.MonadFail P where
+ fail m = getPos >>= \pos -> failP pos [m]
+
-- | execute the given parser on the supplied input stream.
-- returns 'ParseError' if the parser failed, and a pair of