Commit f7d0cf4c authored by Ryan Scott's avatar Ryan Scott

Old patch cleanup, migration

* The patches for `asn1-encoding`, `control-monad-omega`,
  `equivalence`, `hedgehog`, `language-c`, `socks`, `streaming`,
  `turtle`, and `vector-th-unbox` are no longer needed, as the latest
  Hackage versions support GHC 8.8 and HEAD.
* The patches for `regex-pcre-builtin`, `safecopy`,
  `skylighting-core`, and `texmath` have been migrated to the latest
  Hackage versions.
* A patch for `vinyl-0.12.0` has been added. This is mostly the same
  as the patch for `vinyl-0.11.0`, except that fewer changes are
  needed, since `vinyl-0.12.0` supports GHC 8.8.
parent 82d0fd99
Pipeline #10751 passed with stages
in 118 minutes and 14 seconds
diff -ru asn1-encoding-0.9.5.orig/Data/ASN1/Get.hs asn1-encoding-0.9.5/Data/ASN1/Get.hs
--- asn1-encoding-0.9.5.orig/Data/ASN1/Get.hs 2016-06-07 00:53:07.000000000 -0400
+++ asn1-encoding-0.9.5/Data/ASN1/Get.hs 2019-03-16 09:34:51.248651835 -0400
@@ -15,6 +15,7 @@
-- The original code has been tailored and reduced to only cover the useful
-- case for asn1 and augmented by a position.
--
+{-# LANGUAGE CPP #-}
{-# LANGUAGE Rank2Types #-}
module Data.ASN1.Get
( Result(..)
@@ -29,6 +30,7 @@
import Control.Applicative (Applicative(..),Alternative(..))
import Control.Monad (ap,MonadPlus(..))
+import qualified Control.Monad.Fail as Fail
import Data.Maybe (fromMaybe)
import Foreign
@@ -103,6 +105,11 @@
let ks' s1 b1 m1 p1 a = unGet (g a) s1 b1 m1 p1 kf ks
in unGet m s0 b0 m0 p0 kf ks'
+#if !(MIN_VERSION_base(4,13,0))
+ fail = Fail.fail
+#endif
+
+instance Fail.MonadFail Get where
fail = failDesc
instance MonadPlus Get where
diff --git a/Control/Monad/Omega.hs b/Control/Monad/Omega.hs
index a9e14e4..ec16ba8 100644
--- a/Control/Monad/Omega.hs
+++ b/Control/Monad/Omega.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
----------------------------------------------
-- |
-- Module : Control.Monad.Omega
@@ -45,6 +46,8 @@ import qualified Control.Applicative as Applicative
import qualified Data.Foldable as Foldable
import qualified Data.Traversable as Traversable
+import qualified Control.Monad.Fail as Fail
+
-- | This is the hinge algorithm of the Omega monad,
-- exposed because it can be useful on its own. Joins
-- a list of lists with the property that for every i j
@@ -72,6 +75,12 @@ instance Functor Omega where
instance Monad Omega where
return x = Omega [x]
Omega m >>= f = Omega $ diagonal $ map (runOmega . f) m
+
+#if !(MIN_VERSION_base(4,13,0))
+ fail = Fail.fail
+#endif
+
+instance Fail.MonadFail Omega where
fail _ = Omega []
instance Monad.MonadPlus Omega where
diff --git a/control-monad-omega.cabal b/control-monad-omega.cabal
index a04ab5f..65e56cf 100644
--- a/control-monad-omega.cabal
+++ b/control-monad-omega.cabal
@@ -1,3 +1,4 @@
+cabal-version: 1.12
Name: control-monad-omega
Description:
A monad for enumerating sets: like the list
@@ -11,5 +12,25 @@ Homepage: http://github.com/luqui/control-monad-omega
Author: Luke Palmer
Maintainer: lrpalmer@gmail.com
Build-Type: Simple
-Build-Depends: base <= 5
-Exposed-Modules: Control.Monad.Omega
+Tested-With:
+ GHC ==7.0.4
+ || ==7.2.2
+ || ==7.4.2
+ || ==7.6.3
+ || ==7.8.4
+ || ==7.10.3
+ || ==8.0.2
+ || ==8.2.2
+ || ==8.4.4
+ || ==8.6.5
+ || ==8.8.1
+
+library
+ Default-Language: Haskell2010
+ Build-Depends: base >=4.3 && <5
+ Exposed-Modules: Control.Monad.Omega
+ Other-Extensions: CPP
+
+ if !impl(ghc >= 8.0)
+ build-depends:
+ fail >= 4.9.0.0 && <5
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)
version: 1.0
x-revision: 2
name:
hedgehog
author:
Jacob Stanley
maintainer:
Jacob Stanley <jacob@stanley.io>
homepage:
https://hedgehog.qa
bug-reports:
https://github.com/hedgehogqa/haskell-hedgehog/issues
synopsis:
Release with confidence.
description:
<http://hedgehog.qa/ Hedgehog> automatically generates a comprehensive array
of test cases, exercising your software in ways human testers would never
imagine.
.
Generate hundreds of test cases automatically, exposing even the
most insidious of corner cases. Failures are automatically simplified, giving
developers coherent, intelligible error messages.
.
To get started quickly, see the <https://github.com/hedgehogqa/haskell-hedgehog/tree/master/hedgehog-example examples>.
category:
Testing
license:
BSD3
license-file:
LICENSE
cabal-version:
>= 1.8
build-type:
Simple
tested-with:
GHC == 8.0.2
, GHC == 8.2.2
, GHC == 8.4.4
, GHC == 8.6.4
extra-source-files:
README.md
CHANGELOG.md
source-repository head
type: git
location: git://github.com/hedgehogqa/haskell-hedgehog.git
library
build-depends:
-- GHC 8.0.1 / base-4.9.0.0 (May 2016)
base >= 4.9 && < 5
, ansi-terminal >= 0.6 && < 0.10
, async >= 2.0 && < 2.3
, bytestring >= 0.10 && < 0.11
, concurrent-output >= 1.7 && < 1.11
, containers >= 0.4 && < 0.7
, directory >= 1.2 && < 1.4
, exceptions >= 0.7 && < 0.11
, fail >= 4.9 && < 5
, lifted-async >= 0.7 && < 0.11
, mmorph >= 1.0 && < 1.2
, monad-control >= 1.0 && < 1.1
, mtl >= 2.1 && < 2.3
, pretty-show >= 1.6 && < 1.10
, primitive >= 0.6 && < 0.8
, random >= 1.1 && < 1.2
, resourcet >= 1.1 && < 1.3
, semigroups >= 0.16 && < 0.20
, stm >= 2.4 && < 2.6
, template-haskell >= 2.10 && < 2.15
, text >= 1.1 && < 1.3
, time >= 1.4 && < 1.10
, transformers >= 0.5 && < 0.6
, transformers-base >= 0.4.5.1 && < 0.5
, wl-pprint-annotated >= 0.0 && < 0.2
ghc-options:
-Wall
if impl(ghc >= 8.0)
ghc-options: -Wnoncanonical-monad-instances
hs-source-dirs:
src
exposed-modules:
Hedgehog
Hedgehog.Gen
Hedgehog.Main
Hedgehog.Range
Hedgehog.Internal.Config
Hedgehog.Internal.Discovery
Hedgehog.Internal.Distributive
Hedgehog.Internal.Exception
Hedgehog.Internal.Gen
Hedgehog.Internal.HTraversable
Hedgehog.Internal.Opaque
Hedgehog.Internal.Property
Hedgehog.Internal.Queue
Hedgehog.Internal.Range
Hedgehog.Internal.Region
Hedgehog.Internal.Report
Hedgehog.Internal.Runner
Hedgehog.Internal.Seed
Hedgehog.Internal.Show
Hedgehog.Internal.Shrink
Hedgehog.Internal.Source
Hedgehog.Internal.State
Hedgehog.Internal.TH
Hedgehog.Internal.Tree
Hedgehog.Internal.Tripping
test-suite test
type:
exitcode-stdio-1.0
main-is:
test.hs
ghc-options:
-Wall -threaded -O2
hs-source-dirs:
test
other-modules:
Test.Hedgehog.Applicative
Test.Hedgehog.Filter
Test.Hedgehog.Seed
Test.Hedgehog.Text
Test.Hedgehog.Zip
build-depends:
hedgehog
, base >= 3 && < 5
, containers >= 0.4 && < 0.7
, mmorph >= 1.0 && < 1.2
, mtl >= 2.1 && < 2.3
, pretty-show >= 1.6 && < 1.10
, semigroups >= 0.16 && < 0.20
, text >= 1.1 && < 1.3
, transformers >= 0.3 && < 0.6
diff -ru hedgehog-1.0.orig/src/Hedgehog/Internal/Gen.hs hedgehog-1.0/src/Hedgehog/Internal/Gen.hs
--- hedgehog-1.0.orig/src/Hedgehog/Internal/Gen.hs 2019-05-13 05:52:05.000000000 -0400
+++ hedgehog-1.0/src/Hedgehog/Internal/Gen.hs 2019-05-17 13:26:15.191782408 -0400
@@ -1,5 +1,6 @@
{-# OPTIONS_HADDOCK not-home #-}
{-# LANGUAGE ApplicativeDo #-}
+{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
@@ -486,8 +487,10 @@
runGenT size sk . k =<<
runGenT size sm m
+#if !(MIN_VERSION_base(4,13,0))
fail =
Fail.fail
+#endif
instance Monad m => MonadFail (GenT m) where
fail =
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
diff -ru regex-pcre-builtin-0.94.5.8.8.35.orig/Text/Regex/PCRE/Wrap.hsc regex-pcre-builtin-0.94.5.8.8.35/Text/Regex/PCRE/Wrap.hsc
--- regex-pcre-builtin-0.94.5.8.8.35.orig/Text/Regex/PCRE/Wrap.hsc 2001-09-08 21:46:40.000000000 -0400
+++ regex-pcre-builtin-0.94.5.8.8.35/Text/Regex/PCRE/Wrap.hsc 2019-09-30 13:58:15.403934422 -0400
@@ -69,6 +69,8 @@
retNoSubstring
) where
+import qualified Control.Monad.Fail as Fail
+
#if defined(HAVE_PCRE_H)
import Control.Monad(when)
import Data.Array(Array,accumArray)
@@ -134,7 +136,7 @@
(=~) :: (RegexMaker Regex CompOption ExecOption source,RegexContext Regex source1 target)
=> source1 -> source -> target
-(=~~) :: (RegexMaker Regex CompOption ExecOption source,RegexContext Regex source1 target,Monad m)
+(=~~) :: (RegexMaker Regex CompOption ExecOption source,RegexContext Regex source1 target,Fail.MonadFail m)
=> source1 -> source -> m target
#if defined(HAVE_PCRE_H)
@@ -154,7 +156,7 @@
q = makeRegex r
in match q x
--- (=~~) ::(RegexMaker Regex CompOption ExecOption source,RegexContext Regex source1 target,Monad m) => source1 -> source -> m target
+-- (=~~) ::(RegexMaker Regex CompOption ExecOption source,RegexContext Regex source1 target,Fail.MonadFail m) => source1 -> source -> m target
(=~~) x r = do (q :: Regex) <- makeRegexM r
matchM q x
-- safecopy.cabal auto-generated by cabal init. For additional
-- options, see
-- http://www.haskell.org/cabal/release/cabal-latest/doc/users-guide/authors.html#pkg-descr.
-- The name of the package.
Name: safecopy
Version: 0.10.1
x-revision: 1
Synopsis: Binary serialization with version control.
Description: An extension to Data.Serialize with built-in version control.
Homepage: https://github.com/acid-state/safecopy
License: PublicDomain
Author: David Himmelstrup, Felipe Lessa
Maintainer: Lemmih <lemmih@gmail.com>
-- Copyright:
Category: Data, Parsing
Build-type: Simple
Extra-source-files: CHANGELOG.md
Cabal-version: >=1.8
tested-with: GHC==8.0.2, GHC==8.2.2, GHC==8.4.4, GHC==8.6.5, GHC==8.8.1
Source-repository head
type: git
location: git://github.com/acid-state/safecopy.git
Library
-- Modules exported by the library.
Exposed-modules: Data.SafeCopy
Data.SafeCopy.Internal
Hs-Source-Dirs: src/
-- Packages needed in order to build this package.
Build-depends: base >=4.9 && <5,
array < 0.6,
cereal >= 0.5 && < 0.6,
bytestring < 0.11,
generic-data >= 0.3,
containers >= 0.3 && < 0.7,
old-time < 1.2,
template-haskell < 2.15,
text < 1.3,
time < 1.10,
transformers < 0.6,
vector >= 0.10 && < 0.13
-- Modules not exported by this package.
Other-modules: Data.SafeCopy.Instances, Data.SafeCopy.SafeCopy,
Data.SafeCopy.Derive
-- Extra tools (e.g. alex, hsc2hs, ...) needed to build the source.
-- Build-tools:
GHC-Options: -Wall
cpp-options: -DDEFAULT_SIGNATURES -DSAFE_HASKELL
Test-suite instances
Type: exitcode-stdio-1.0
Main-is: instances.hs
Hs-Source-Dirs: test/
GHC-Options: -Wall -threaded -rtsopts -with-rtsopts=-N
Build-depends: base, cereal, template-haskell, safecopy,
containers, time, array, vector, lens >= 4.7 && < 5.0,
lens-action, tasty, tasty-quickcheck, quickcheck-instances, QuickCheck
Test-suite generic
Type: exitcode-stdio-1.0
Main-is: generic.hs
Hs-Source-Dirs: test/
GHC-Options: -Wall -threaded -rtsopts -with-rtsopts=-N
Build-depends: base, bytestring, cereal, safecopy, HUnit
diff -ru safecopy-0.10.0.orig/src/Data/SafeCopy/Derive.hs safecopy-0.10.0/src/Data/SafeCopy/Derive.hs
--- safecopy-0.10.0.orig/src/Data/SafeCopy/Derive.hs 2019-09-13 13:27:45.000000000 -0400
+++ safecopy-0.10.0/src/Data/SafeCopy/Derive.hs 2019-09-13 17:49:25.307267022 -0400
@@ -259,19 +259,29 @@
From a77247a03bffa2b3b0a2e5baaaf461a5a877e2f2 Mon Sep 17 00:00:00 2001
From: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Wed, 25 Sep 2019 09:44:19 -0400
Subject: [PATCH] Support building with template-haskell-2.15
Fixes #76.
---
src/Data/SafeCopy/Derive.hs | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/src/Data/SafeCopy/Derive.hs b/src/Data/SafeCopy/Derive.hs
index 6eab0d5..34e29fc 100644
--- a/src/Data/SafeCopy/Derive.hs
+++ b/src/Data/SafeCopy/Derive.hs
@@ -242,11 +242,19 @@ internalDeriveSafeCopy' deriveType versionId kindName tyName info = do
FamilyI _ insts -> do
decs <- forM insts $ \inst ->
case inst of
+#if MIN_VERSION_template_haskell(2,15,0)
+ DataInstD context _ nty _kind cons _derivs ->
+ worker' (return nty) context [] (zip [0..] cons)
+#else
#if MIN_VERSION_template_haskell(2,11,0)
DataInstD context _name ty _kind cons _derivs ->
#else
DataInstD context _name ty cons _derivs ->
#endif
worker' (foldl appT (conT tyName) (map return ty)) context [] (zip [0..] cons)
+#endif
+#if MIN_VERSION_template_haskell(2,15,0)
+
+ NewtypeInstD context _ nty _kind con _derivs ->
+ worker' (return nty) context [] [(0, con)]
+#else
#if MIN_VERSION_template_haskell(2,11,0)
DataInstD context _name ty _kind cons _derivs ->
worker' (foldl appT (conT tyName) (map return ty)) context [] (zip [0..] cons)
NewtypeInstD context _name ty _kind con _derivs ->
#else
NewtypeInstD context _name ty con _derivs ->
#endif
worker' (foldl appT (conT tyName) (map return ty)) context [] [(0, con)]
+#endif
_ -> fail $ "Can't derive SafeCopy instance for: " ++ show (tyName, inst)
return $ concat decs
_ -> fail $ "Can't derive SafeCopy instance for: " ++ show (tyName, info)
@@ -305,6 +315,13 @@
@@ -276,15 +284,27 @@ internalDeriveSafeCopyIndexedType' deriveType versionId kindName tyName tyIndex'
FamilyI _ insts -> do
decs <- forM insts $ \inst ->
case inst of
......@@ -39,45 +40,23 @@ diff -ru safecopy-0.10.0.orig/src/Data/SafeCopy/Derive.hs safecopy-0.10.0/src/Da
+ DataInstD context _ nty _kind cons _derivs
+ | nty == foldl AppT (ConT tyName) tyIndex ->
+ worker' (return nty) context [] (zip [0..] cons)
+ | otherwise ->
+ return []
+#else
#if MIN_VERSION_template_haskell(2,11,0)
DataInstD context _name ty _kind cons _derivs
#else
@@ -314,7 +331,15 @@
| ty == tyIndex ->
worker' (foldl appT (conT tyName) (map return ty)) context [] (zip [0..] cons)
+#endif
| otherwise ->
return []
+#endif
+#if MIN_VERSION_template_haskell(2,15,0)
+ NewtypeInstD context _ nty _kind con _derivs
+ | nty == foldl AppT (ConT tyName) tyIndex ->
+ worker' (return nty) context [] [(0, con)]
+ | otherwise ->
+ return []
+#else
#if MIN_VERSION_template_haskell(2,11,0)
NewtypeInstD context _name ty _kind con _derivs
#else
@@ -324,6 +349,7 @@
| ty == tyIndex ->
worker' (foldl appT (conT tyName) (map return ty)) context [] [(0, con)]
+#endif
| otherwise ->
return []
+#endif
_ -> fail $ "Can't derive SafeCopy instance for: " ++ show (tyName, inst)
return $ concat decs
_ -> fail $ "Can't derive SafeCopy instance for: " ++ show (tyName, info)
diff -ru safecopy-0.10.0.orig/src/Data/SafeCopy/SafeCopy.hs safecopy-0.10.0/src/Data/SafeCopy/SafeCopy.hs
--- safecopy-0.10.0.orig/src/Data/SafeCopy/SafeCopy.hs 2019-09-13 13:27:45.000000000 -0400
+++ safecopy-0.10.0/src/Data/SafeCopy/SafeCopy.hs 2019-09-13 17:49:25.307267022 -0400
@@ -551,7 +551,7 @@
checkConsistency :: (SafeCopy a, Monad m) => Proxy a -> m b -> m b
checkConsistency proxy ks
= case consistentFromProxy proxy of
- NotConsistent msg -> fail msg
+ NotConsistent msg -> error msg
Consistent -> ks
{-# INLINE computeConsistency #-}
diff -ru skylighting-core-0.8.2.orig/src/Skylighting/Regex.hs skylighting-core-0.8.2/src/Skylighting/Regex.hs
--- skylighting-core-0.8.2.orig/src/Skylighting/Regex.hs 2019-07-14 12:56:37.000000000 -0400
+++ skylighting-core-0.8.2/src/Skylighting/Regex.hs 2019-07-27 09:30:40.211827426 -0400
diff -ru skylighting-core-0.8.2.1.orig/src/Skylighting/Regex.hs skylighting-core-0.8.2.1/src/Skylighting/Regex.hs
--- skylighting-core-0.8.2.1.orig/src/Skylighting/Regex.hs 2019-09-25 17:30:50.000000000 -0400
+++ skylighting-core-0.8.2.1/src/Skylighting/Regex.hs 2019-09-30 13:58:22.084005657 -0400
@@ -12,6 +12,7 @@
, convertOctalEscapes
) where
......
commit d81a8117a1b31d784f7b98135427863629d7eeca
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Fri Mar 15 18:12:23 2019 -0400
Adapt to base-4.13.0.0
diff --git a/Network/Socks5/Parse.hs b/Network/Socks5/Parse.hs
index d857274..fe4fd27 100644
--- a/Network/Socks5/Parse.hs
+++ b/Network/Socks5/Parse.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE OverloadedStrings #-}
@@ -36,6 +37,7 @@ module Network.Socks5.Parse
import Control.Applicative
import Control.Monad
+import qualified Control.Monad.Fail as Fail
import Data.ByteString (ByteString)
import qualified Data.ByteString as B
import qualified Data.ByteString.Internal as B (toForeignPtr)
@@ -71,10 +73,14 @@ newtype Parser a = Parser
{ runParser :: forall r . ByteString -> Failure r -> Success a r -> Result r }
instance Monad Parser where
- fail errorMsg = Parser $ \buf err _ -> err buf ("failed: " ++ errorMsg)
+#if !(MIN_VERSION_base(4,13,0))
+ fail = Fail.fail
+#endif
return v = Parser $ \buf _ ok -> ok buf v
m >>= k = Parser $ \buf err ok ->
runParser m buf err (\buf' a -> runParser (k a) buf' err ok)
+instance Fail.MonadFail Parser where
+ fail errorMsg = Parser $ \buf err _ -> err buf ("failed: " ++ errorMsg)
instance MonadPlus Parser where
mzero = fail "Parser.MonadPlus.mzero"
mplus f g = Parser $ \buf err ok ->
This diff is collapsed.
commit 93324cf750bc289bb1cb8c1f0087367a8510c23d
Author: Ben Gamari <ben@smart-cactus.org>
Date: Mon Jul 15 13:34:47 2019 -0400
Adjust for base 4.13 MonadFail changes.
Adds a MonadFail instance for Stream as well
as removing fail from the Monad instance under
base 4.13.
diff --git a/changelog.md b/changelog.md
index 666ee3a..dac7930 100644
--- a/changelog.md
+++ b/changelog.md
@@ -19,6 +19,10 @@
Generalise type signature of `toList_`.
+ Compatibility with base 4.13.
+
+ Provide a MonadFail instance for Stream.
+
- 0.2.1.0
Adding `Semigroup` instances for GHC 8.4.
diff --git a/src/Streaming/Internal.hs b/src/Streaming/Internal.hs
index a789f68..cd6f7b4 100644
--- a/src/Streaming/Internal.hs
+++ b/src/Streaming/Internal.hs
<