Commit 43991b1c authored by Ryan Scott's avatar Ryan Scott

Remove patches for old Hackage releases

parent c30466e7
Pipeline #8870 failed with stages
in 69 minutes and 20 seconds
diff -ru HTTP-4000.3.13.orig/Network/Browser.hs HTTP-4000.3.13/Network/Browser.hs
--- HTTP-4000.3.13.orig/Network/Browser.hs 2019-03-17 07:46:06.000000000 -0400
+++ HTTP-4000.3.13/Network/Browser.hs 2019-03-23 09:56:07.221275392 -0400
@@ -143,6 +143,7 @@
#else
import Control.Monad (filterM, forM_, when)
#endif
+import qualified Control.Monad.Fail as Fail
import Control.Monad.State (StateT (..), MonadIO (..), modify, gets, withStateT, evalStateT, MonadState (..))
import qualified System.IO
@@ -416,13 +417,13 @@
newtype BrowserAction conn a
= BA { unBA :: StateT (BrowserState conn) IO a }
#ifdef MTL1
- deriving (Functor, Monad, MonadIO, MonadState (BrowserState conn))
+ deriving (Functor, Monad, MonadIO, MonadState (BrowserState conn), Fail.MonadFail)
instance Applicative (BrowserAction conn) where
pure = return
(<*>) = ap
#else
- deriving (Functor, Applicative, Monad, MonadIO, MonadState (BrowserState conn))
+ deriving (Functor, Applicative, Monad, MonadIO, MonadState (BrowserState conn), Fail.MonadFail)
#endif
runBA :: BrowserState conn -> BrowserAction conn a -> IO a
diff -ru HTTP-4000.3.13.orig/Network/HTTP/Base.hs HTTP-4000.3.13/Network/HTTP/Base.hs
--- HTTP-4000.3.13.orig/Network/HTTP/Base.hs 2019-03-17 07:46:06.000000000 -0400
+++ HTTP-4000.3.13/Network/HTTP/Base.hs 2019-03-23 09:55:00.736769582 -0400
@@ -108,6 +108,7 @@
import Control.Monad ( guard )
import Control.Monad.Error.Class ()
+import qualified Control.Monad.Fail as Fail
import Data.Bits ( (.&.), (.|.), shiftL, shiftR )
import Data.Word ( Word8 )
import Data.Char ( digitToInt, intToDigit, toLower, isDigit,
@@ -209,7 +210,7 @@
default_http = 80
default_https = 443
-failHTTPS :: Monad m => URI -> m ()
+failHTTPS :: Fail.MonadFail m => URI -> m ()
failHTTPS uri
| map toLower (uriScheme uri) == "https:" = fail "https not supported"
| otherwise = return ()
@@ -713,7 +714,7 @@
-- | @getAuth req@ fishes out the authority portion of the URL in a request's @Host@
-- header.
-getAuth :: Monad m => Request ty -> m URIAuthority
+getAuth :: Fail.MonadFail m => Request ty -> m URIAuthority
getAuth r =
-- ToDo: verify that Network.URI functionality doesn't take care of this (now.)
case parseURIAuthority auth of
commit 12031cb665d5dc365ae3ea7dee6df23badcc740e
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Fri May 17 13:52:00 2019 -0400
Adapt to base-4.13.0.0
diff --git a/src/Data/YAML.hs b/src/Data/YAML.hs
index 9eb3a66..46ad654 100644
--- a/src/Data/YAML.hs
+++ b/src/Data/YAML.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE Safe #-}
@@ -211,7 +212,9 @@ instance Monad Parser where
return = pure
P m >>= k = P (m >>= unP . k)
(>>) = (*>)
+#if !(MIN_VERSION_base(4,13,0))
fail = Fail.fail
+#endif
-- | @since 0.1.1.0
instance Fail.MonadFail Parser where
diff --git a/src/Data/YAML/Token.hs b/src/Data/YAML/Token.hs
index df3e95e..ff9d0f9 100644
--- a/src/Data/YAML/Token.hs
+++ b/src/Data/YAML/Token.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
@@ -24,6 +25,7 @@ module Data.YAML.Token
, Code(..)
) where
+import qualified Control.Monad.Fail as Fail
import qualified Data.ByteString.Lazy.Char8 as BLC
import qualified Data.DList as D
import Prelude hiding ((*), (+), (-), (/), (^))
@@ -442,6 +444,12 @@ instance Monad Parser where
(>>) = (*>)
+#if !(MIN_VERSION_base(4,13,0))
+ -- @fail message@ does just that - fails with a /message/.
+ fail = Fail.fail
+#endif
+
+instance Fail.MonadFail Parser where
-- @fail message@ does just that - fails with a /message/.
fail message = Parser $ \state -> failReply state message
Name: JuicyPixels
Version: 3.3.3
x-revision: 1
Synopsis: Picture loading/serialization (in png, jpeg, bitmap, gif, tga, tiff and radiance)
Description:
<<data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADABAMAAACg8nE0AAAAElBMVEUAAABJqDSTWEL/qyb///8AAABH/1GTAAAAAXRSTlMAQObYZgAAAN5JREFUeF7s1sEJgFAQxFBbsAV72v5bEVYWPwT/XDxmCsi7zvHXavYREBDI3XP2GgICqBBYuwIC+/rVayPUAyAg0HvIXBcQoDFDGnUBgWQQ2Bx3AYFaRoBpAQHWb3bt2ARgGAiCYFFuwf3X5HA/McgGJWI2FdykCv4aBYzmKwDwvl6NVmUAAK2vlwEALK7fo88GANB6HQsAAAAAAAAA7P94AQCzswEAAAAAAAAAAAAAAAAAAICzh4UAO4zWAYBfRutHA4Bn5C69JhowAMGoBaMWDG0wCkbBKBgFo2AUAACPmegUST/IJAAAAABJRU5ErkJggg==>>
.
This library can load and store images in PNG,Bitmap, Jpeg, Radiance, Tiff and Gif images.
homepage: https://github.com/Twinside/Juicy.Pixels
License: BSD3
License-file: LICENSE
Author: Vincent Berthoux
Maintainer: vincent.berthoux@gmail.com
Category: Codec, Graphics, Image
Stability: Stable
Build-type: Simple
-- Constraint on the version of Cabal needed to build this package.
Cabal-version: >= 1.18
extra-source-files: changelog, docimages/*.png, docimages/*.svg, README.md
extra-doc-files: docimages/*.png, docimages/*.svg
Source-Repository head
Type: git
Location: git://github.com/Twinside/Juicy.Pixels.git
Source-Repository this
Type: git
Location: git://github.com/Twinside/Juicy.Pixels.git
Tag: v3.3.3
Flag Mmap
Description: Enable the file loading via mmap (memory map)
Default: False
Library
hs-source-dirs: src
Default-Language: Haskell2010
Exposed-modules: Codec.Picture,
Codec.Picture.Bitmap,
Codec.Picture.Gif,
Codec.Picture.Png,
Codec.Picture.Jpg,
Codec.Picture.HDR,
Codec.Picture.Tga,
Codec.Picture.Tiff,
Codec.Picture.Metadata,
Codec.Picture.Metadata.Exif,
Codec.Picture.Saving,
Codec.Picture.Types,
Codec.Picture.ColorQuant,
Codec.Picture.Jpg.Internal.DefaultTable,
Codec.Picture.Jpg.Internal.Metadata,
Codec.Picture.Jpg.Internal.FastIdct,
Codec.Picture.Jpg.Internal.FastDct,
Codec.Picture.Jpg.Internal.Types,
Codec.Picture.Jpg.Internal.Common,
Codec.Picture.Jpg.Internal.Progressive,
Codec.Picture.Gif.Internal.LZW,
Codec.Picture.Gif.Internal.LZWEncoding,
Codec.Picture.Png.Internal.Export,
Codec.Picture.Png.Internal.Type,
Codec.Picture.Png.Internal.Metadata,
Codec.Picture.Tiff.Internal.Metadata,
Codec.Picture.Tiff.Internal.Types
Ghc-options: -O3 -Wall
Build-depends: base >= 4.11 && < 5,
bytestring >= 0.9 && < 0.11,
mtl >= 1.1 && < 2.3,
binary >= 0.5 && < 0.9,
zlib >= 0.5.3.1 && < 0.7,
transformers >= 0.2,
vector >= 0.10 && < 0.13,
primitive >= 0.4 && < 0.7,
deepseq >= 1.1 && < 1.5,
containers >= 0.4.2 && < 0.7
-- Modules not exported by this package.
Other-modules: Codec.Picture.BitWriter,
Codec.Picture.InternalHelper,
Codec.Picture.VectorByteConversion
Install-Includes: src/Codec/Picture/ConvGraph.hs
Include-Dirs: src/Codec/Picture
diff -ru JuicyPixels-3.3.3.orig/src/Codec/Picture/Bitmap.hs JuicyPixels-3.3.3/src/Codec/Picture/Bitmap.hs
--- JuicyPixels-3.3.3.orig/src/Codec/Picture/Bitmap.hs 2018-12-16 16:36:06.000000000 -0500
+++ JuicyPixels-3.3.3/src/Codec/Picture/Bitmap.hs 2019-03-16 08:05:10.530793764 -0400
@@ -26,6 +26,7 @@
import Control.Arrow( first )
import Control.Monad( replicateM, when, foldM_, forM_, void )
+import qualified Control.Monad.Fail as Fail
import Control.Monad.ST ( ST, runST )
import Data.Maybe( fromMaybe )
import qualified Data.Vector.Storable as VS
@@ -884,7 +885,7 @@
a -> fail $ "Can't handle BMP file " ++ show a
-- | Decode a bitfield. Will fail if the bitfield is empty.
-getBitfield :: (FiniteBits t, Integral t, Num t, Monad m) => t -> m (Bitfield t)
+getBitfield :: (FiniteBits t, Integral t, Num t, Fail.MonadFail m) => t -> m (Bitfield t)
getBitfield 0 = fail $
"Codec.Picture.Bitmap.getBitfield: bitfield cannot be 0"
getBitfield w = return (makeBitfield w)
diff -ru JuicyPixels-3.3.3.orig/src/Codec/Picture/Jpg.hs JuicyPixels-3.3.3/src/Codec/Picture/Jpg.hs
--- JuicyPixels-3.3.3.orig/src/Codec/Picture/Jpg.hs 2018-12-16 16:36:06.000000000 -0500
+++ JuicyPixels-3.3.3/src/Codec/Picture/Jpg.hs 2019-03-16 08:05:34.710988437 -0400
@@ -309,7 +309,7 @@
scanSpecifier scanCount scanSpec = do
compMapping <- gets componentIndexMapping
comp <- case lookup (componentSelector scanSpec) compMapping of
- Nothing -> fail "Jpg decoding error - bad component selector in blob."
+ Nothing -> error "Jpg decoding error - bad component selector in blob."
Just v -> return v
let maximumHuffmanTable = 4
dcIndex = min (maximumHuffmanTable - 1)
@@ -326,7 +326,7 @@
frameInfo <- gets currentFrame
blobId <- gets seenBlobs
case frameInfo of
- Nothing -> fail "Jpg decoding error - no previous frame"
+ Nothing -> error "Jpg decoding error - no previous frame"
Just v -> do
let compDesc = jpgComponents v !! comp
compCount = length $ jpgComponents v
commit d8126acd23b70c225c591d40a18a1d6b7833bbab
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Fri Mar 29 06:46:04 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 ->
commit 194eaa0d3dbafd593eeb12deb57374476a1adf4f
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Fri Mar 15 18:27:52 2019 -0400
Adapt to base-4.13.0.0
diff --git a/Data/Aeson/Types/Internal.hs b/Data/Aeson/Types/Internal.hs
index abe5afc..319225c 100644
--- a/Data/Aeson/Types/Internal.hs
+++ b/Data/Aeson/Types/Internal.hs
@@ -157,8 +157,10 @@ instance Monad IResult where
IError path err >>= _ = IError path err
{-# INLINE (>>=) #-}
+#if !(MIN_VERSION_base(4,13,0))
fail = Fail.fail
{-# INLINE fail #-}
+#endif
instance Fail.MonadFail IResult where
fail err = IError [] err
@@ -172,8 +174,10 @@ instance Monad Result where
Error err >>= _ = Error err
{-# INLINE (>>=) #-}
+#if !(MIN_VERSION_base(4,13,0))
fail = Fail.fail
{-# INLINE fail #-}
+#endif
instance Fail.MonadFail Result where
fail err = Error err
@@ -287,8 +291,10 @@ instance Monad Parser where
{-# INLINE (>>=) #-}
return = pure
{-# INLINE return #-}
+#if !(MIN_VERSION_base(4,13,0))
fail = Fail.fail
{-# INLINE fail #-}
+#endif
instance Fail.MonadFail Parser where
fail msg = Parser $ \path kf _ks -> kf (reverse path) msg
name: basement
version: 0.0.10
x-revision: 1
synopsis: Foundation scrap box of array & string
description: Foundation most basic primitives without any dependencies
license: BSD3
license-file: LICENSE
copyright: 2015-2017 Vincent Hanquez <vincent@snarc.org>
, 2017-2018 Foundation Maintainers
maintainer: vincent@snarc.org
category: Web
build-type: Simple
homepage: https://github.com/haskell-foundation/foundation#readme
bug-reports: https://github.com/haskell-foundation/foundation/issues
cabal-version: >=1.10
extra-source-files: cbits/*.h cbits/basement_rts.c
source-repository head
type: git
location: https://github.com/haskell-foundation/foundation
subdir: basement
library
hs-source-dirs: .
exposed-modules:
Basement.Imports
Basement.Base16
Basement.Bindings.Memory
Basement.Endianness
Basement.Environment
Basement.PrimType
Basement.Exception
Basement.Cast
Basement.From
Basement.Types.Char7
Basement.Types.CharUTF8
Basement.Types.OffsetSize
Basement.Types.Ptr
Basement.Types.AsciiString
Basement.Types.Word128
Basement.Types.Word256
Basement.Monad
Basement.MutableBuilder
Basement.FinalPtr
Basement.Nat
-- Extended Types
Basement.BoxedArray
Basement.Block
Basement.Block.Mutable
Basement.Block.Builder
Basement.UArray
Basement.UArray.Mutable
Basement.String
Basement.String.Builder
Basement.NonEmpty
-- Extended Types with explicit type level size
Basement.Sized.Block
Basement.Sized.UVect
Basement.Sized.Vect
Basement.Sized.List
Basement.BlockN
-- Utils
Basement.NormalForm
Basement.These
-- Terminal
Basement.Terminal
Basement.Terminal.ANSI
-- numeric stuff
Basement.IntegralConv
Basement.Floating
Basement.Numerical.Number
Basement.Numerical.Additive
Basement.Numerical.Subtractive
Basement.Numerical.Multiplicative
Basement.Bounded
-- exported algorithms
Basement.Alg.XorShift
-- compat / base redefinition
Basement.Compat.AMP
Basement.Compat.Base
Basement.Compat.Bifunctor
Basement.Compat.CallStack
Basement.Compat.C.Types
Basement.Compat.ExtList
Basement.Compat.IsList
Basement.Compat.Identity
Basement.Compat.Primitive
Basement.Compat.PrimTypes
Basement.Compat.MonadTrans
Basement.Compat.Semigroup
Basement.Compat.Natural
Basement.Compat.NumLiteral
Basement.Compat.Typeable
Basement.Bits
other-modules:
Basement.Error
Basement.Show
Basement.Runtime
Basement.Alg.Class
Basement.Alg.Mutable
Basement.Alg.PrimArray
Basement.Alg.UTF8
Basement.Alg.String
Basement.Numerical.Conversion
Basement.Block.Base
Basement.UTF8.Base
Basement.UTF8.Helper
Basement.UTF8.Table
Basement.UTF8.Types
Basement.UArray.Base
Basement.String.CaseMapping
Basement.String.Encoding.Encoding
Basement.String.Encoding.UTF16
Basement.String.Encoding.UTF32
Basement.String.Encoding.ASCII7
Basement.String.Encoding.ISO_8859_1
Basement.Terminal.Size
-- support and dependencies
if impl(ghc < 8.0)
-- https://github.com/haskell-infra/hackage-trustees/issues/171
build-depends: base >= 4.9 && < 4.13
else
build-depends: base
, ghc-prim
if os(windows)
build-depends: Win32
default-language: Haskell2010
default-extensions: NoImplicitPrelude
RebindableSyntax
TypeFamilies
BangPatterns
DeriveDataTypeable
if (arch(i386) || arch(x86_64))
cpp-options: -DARCH_IS_LITTLE_ENDIAN
else
cpp-options: -DARCH_IS_UNKNOWN_ENDIAN
include-dirs: cbits
c-sources: cbits/foundation_mem.c
if impl(ghc < 8.2)
c-sources: cbits/basement_rts.c
diff -ru basement-0.0.10.orig/Basement/Compat/Base.hs basement-0.0.10/Basement/Compat/Base.hs
--- basement-0.0.10.orig/Basement/Compat/Base.hs 2019-01-09 06:14:46.000000000 -0500
+++ basement-0.0.10/Basement/Compat/Base.hs 2019-03-16 08:58:05.439886586 -0400
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
-- |
-- Module : Basement.Compat.Base
-- License : BSD-style
@@ -34,6 +35,9 @@
, Prelude.Functor (..)
, Control.Applicative.Applicative (..)
, Prelude.Monad (..)
+#if MIN_VERSION_base(4,13,0)
+ , Prelude.MonadFail (..)
+#endif
, Control.Monad.when
, Control.Monad.unless
, Prelude.Maybe (..)
commit ca728de89116448b59f7baa9082ea2e9c9a5cedb
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Fri Mar 15 08:45:34 2019 -0400
Adapt to base-4.13.0.0
diff --git a/src/Data/Serialize/Get.hs b/src/Data/Serialize/Get.hs
index a18a28b..fcda52d 100644
--- a/src/Data/Serialize/Get.hs
+++ b/src/Data/Serialize/Get.hs
@@ -226,8 +226,10 @@ instance Monad Get where
(>>) = (A.*>)
{-# INLINE (>>) #-}
+#if !(MIN_VERSION_base(4,13,0))
fail = Fail.fail
{-# INLINE fail #-}
+#endif
instance Fail.MonadFail Get where
fail = failDesc
diff -ru fmlist-0.9.2.orig/Data/FMList.hs fmlist-0.9.2/Data/FMList.hs
--- fmlist-0.9.2.orig/Data/FMList.hs 2018-01-07 07:28:57.000000000 -0500
+++ fmlist-0.9.2/Data/FMList.hs 2019-03-15 14:43:52.225024755 -0400
@@ -97,6 +97,7 @@
import Data.Foldable (Foldable, foldMap, foldr, toList)
import Data.Traversable (Traversable, traverse)
import Control.Monad
+import qualified Control.Monad.Fail as Fail
import Control.Applicative
-- | 'FMList' is a 'foldMap' function wrapped up in a newtype.
@@ -293,6 +294,11 @@
return = one
m >>= g = transform (\f -> foldMap f . g) m
m >> k = transform (\f -> const (foldMap f k)) m
+#if !(MIN_VERSION_base(4,13,0))
+ fail = Fail.fail
+#endif
+
+instance Fail.MonadFail FMList where
fail _ = nil
instance Applicative FMList where
This diff is collapsed.
diff -ru foundation-0.0.23.orig/Foundation/Check/Main.hs foundation-0.0.23/Foundation/Check/Main.hs
--- foundation-0.0.23.orig/Foundation/Check/Main.hs 2019-01-09 06:14:46.000000000 -0500
+++ foundation-0.0.23/Foundation/Check/Main.hs 2019-03-16 09:27:57.337439071 -0400
@@ -5,6 +5,7 @@
--
-- An application to check that integrate with the .cabal test-suite
--
+{-# LANGUAGE CPP #-}
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE GADTs #-}
@@ -179,11 +180,14 @@
test (CheckPlan name plan) = do
testCheckPlan name plan
test (Property name prop) = do
- r'@(PropertyResult _ nb r) <- testProperty name (property prop)
- case r of
- PropertySuccess -> whenVerbose $ displayPropertySucceed name nb
- PropertyFailed w -> whenErrorOnly $ displayPropertyFailed name nb w
- return r'
+ r' <- testProperty name (property prop)
+ case r' of
+ PropertyResult _ nb r -> do
+ case r of
+ PropertySuccess -> whenVerbose $ displayPropertySucceed name nb
+ PropertyFailed w -> whenErrorOnly $ displayPropertyFailed name nb w
+ return r'
+ _ -> error "Not a PropertyResult"
displayCurrent :: String -> CheckMain ()
displayCurrent name = do
diff -ru foundation-0.0.23.orig/Foundation/Monad/Except.hs foundation-0.0.23/Foundation/Monad/Except.hs
--- foundation-0.0.23.orig/Foundation/Monad/Except.hs 2019-01-09 06:14:46.000000000 -0500
+++ foundation-0.0.23/Foundation/Monad/Except.hs 2019-03-16 09:24:14.275704819 -0400
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE OverloadedStrings #-}
@@ -38,7 +39,9 @@
case a of
Left e -> return (Left e)
Right x -> runExceptT (k x)
+#if !(MIN_VERSION_base(4,13,0))
fail = ExceptT . fail
+#endif
instance (AMPMonad m, MonadFix m) => MonadFix (ExceptT e m) where
mfix f = ExceptT (mfix (runExceptT . f . fromEither))
diff -ru foundation-0.0.23.orig/Foundation/Network/IPv6.hs foundation-0.0.23/Foundation/Network/IPv6.hs
--- foundation-0.0.23.orig/Foundation/Network/IPv6.hs 2019-01-09 06:14:46.000000000 -0500
+++ foundation-0.0.23/Foundation/Network/IPv6.hs 2019-03-16 09:32:07.559381867 -0400
@@ -207,15 +207,18 @@
let (CountOf lenBs1) = length bs1
bs2 <- repeat (Between $ 0 `And` (fromIntegral $ 6 - lenBs1)) $ takeAWord16 <* skipColon
_ <- optional skipColon
- [i1,i2,i3,i4,i5,i6] <- format 6 bs1 bs2
- m1 <- takeAWord8 <* skipDot
- m2 <- takeAWord8 <* skipDot
- m3 <- takeAWord8 <* skipDot
- m4 <- takeAWord8
- return $ fromTuple ( i1,i2,i3,i4,i5,i6
- , m1 `shiftL` 8 .|. m2
- , m3 `shiftL` 8 .|. m4
- )
+ r <- format 6 bs1 bs2
+ case r of
+ [i1,i2,i3,i4,i5,i6] -> do
+ m1 <- takeAWord8 <* skipDot
+ m2 <- takeAWord8 <* skipDot
+ m3 <- takeAWord8 <* skipDot
+ m4 <- takeAWord8
+ return $ fromTuple ( i1,i2,i3,i4,i5,i6
+ , m1 `shiftL` 8 .|. m2
+ , m3 `shiftL` 8 .|. m4
+ )
+ _ -> error "Not a six-element list"
-- | IPv6 parser as described in RFC4291 section 2.2.2
--
@@ -236,12 +239,15 @@
let (CountOf bs1Len) = length bs1
bs2 <- repeat (Between $ 0 `And` fromIntegral (8 - bs1Len)) $
skipColon *> takeAWord16
- [i1,i2,i3,i4,i5,i6,i7,i8] <- format 8 bs1 bs2
- return $ fromTuple (i1,i2,i3,i4,i5,i6,i7,i8)
+ r <- format 8 bs1 bs2
+ case r of
+ [i1,i2,i3,i4,i5,i6,i7,i8] ->
+ return $ fromTuple (i1,i2,i3,i4,i5,i6,i7,i8)
+ _ -> error "Not an eight-element list"
format :: (Integral a, Monad m) => CountOf a -> [a] -> [a] -> m [a]
format sz bs1 bs2
- | sz <= (length bs1 + length bs2) = fail "invalid compressed IPv6 addressed"
+ | sz <= (length bs1 + length bs2) = error "invalid compressed IPv6 addressed"
| otherwise = do
let len = sz `sizeSub` (length bs1 + length bs2)
return $ bs1 <> replicate len 0 <> bs2
@@ -262,4 +268,4 @@
let lhs = readHex l
in case lhs of
[(w, [])] -> return w
- _ -> fail "can't fall here"
+ _ -> error "can't fall here"
diff -ru hxt-9.3.1.16.orig/src/Text/XML/HXT/Arrow/Pickle/Xml.hs hxt-9.3.1.16/src/Text/XML/HXT/Arrow/Pickle/Xml.hs
--- hxt-9.3.1.16.orig/src/Text/XML/HXT/Arrow/Pickle/Xml.hs 2016-08-10 03:55:56.000000000 -0400
+++ hxt-9.3.1.16/src/Text/XML/HXT/Arrow/Pickle/Xml.hs 2019-03-15 15:07:12.856241363 -0400
@@ -65,6 +65,7 @@
import Control.Monad.Error (MonadError (..))
#endif
+import qualified Control.Monad.Fail as Fail
import Control.Monad.State (MonadState (..), gets,
modify)
@@ -141,8 +142,12 @@
case r of
Left err -> (Left err, st')
Right v -> runUP (f v) st'
- fail = throwMsg -- don't use fail, use throwError
+#if !(MIN_VERSION_base(4,13,0))
+ fail = Fail.fail
+#endif
+instance Fail.MonadFail Unpickler where
+ fail = throwMsg -- don't use fail, use throwError
instance MonadState St Unpickler where
get = UP $ \ st -> (Right st, st)
diff -ru inline-c-0.7.0.1.orig/src/Language/C/Inline/Internal.hs inline-c-0.7.0.1/src/Language/C/Inline/Internal.hs
--- inline-c-0.7.0.1.orig/src/Language/C/Inline/Internal.hs 2018-12-16 18:08:10.000000000 -0500
+++ inline-c-0.7.0.1/src/Language/C/Inline/Internal.hs 2019-05-17 16:26:24.310528911 -0400