Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ghc/head.hackage
  • RyanGlScott/head.hackage
  • vaibhavsagar/head.hackage
  • phadej/head.hackage
  • jessoune29/head.hackage
  • alanz/head.hackage
  • clint/head.hackage
  • osa1/head.hackage
  • supersven/head.hackage
  • fendor/head.hackage
  • hsyl20/head.hackage
  • adinapoli/head.hackage
  • alexbiehl/head.hackage
  • mimi.vx/head.hackage
  • Kleidukos/head.hackage
  • wz1000/head.hackage
  • alinab/head.hackage
  • teo/head.hackage
  • duog/head.hackage
  • sheaf/head.hackage
  • expipiplus1/head.hackage
  • drsooch/head.hackage
  • tobias/head.hackage
  • brandonchinn178/head.hackage
  • mpickering/hooks-setup-testing
  • Mikolaj/head.hackage
  • RandomMoonwalker/head.hackage
  • facundominguez/head.hackage
  • trac-fizzixnerd/head.hackage
  • neil.mayhew/head.hackage
  • jappeace/head.hackage
31 results
Show changes
Showing
with 1859 additions and 859 deletions
This diff is collapsed.
diff --git a/ansi-pretty.cabal b/ansi-pretty.cabal
index 37dffa2..b3eb075 100644
--- a/ansi-pretty.cabal
+++ b/ansi-pretty.cabal
@@ -1,10 +1,11 @@
name: ansi-pretty
version: 0.1.2.2
+x-revision: 1
synopsis: AnsiPretty for ansi-wl-pprint
description: 'AnsiPretty' type class, more colorful than 'Pretty'.
category: User Interfaces, Text
-homepage: https://github.com/futurice/haskell-ansi-pretty#readme
-bug-reports: https://github.com/futurice/haskell-ansi-pretty/issues
+homepage: https://github.com/phadej/haskell-ansi-pretty#readme
+bug-reports: https://github.com/phadej/haskell-ansi-pretty/issues
author: Oleg Grenrus <oleg.grenrus@iki.fi>
maintainer: Oleg Grenrus <oleg.grenrus@iki.fi>
license: BSD3
@@ -16,7 +17,8 @@ tested-with:
|| ==8.2.2
|| ==8.4.4
|| ==8.6.5
- || ==8.8.1
+ || ==8.8.4
+ || ==8.10.3
build-type: Simple
cabal-version: >=1.10
@@ -26,17 +28,17 @@ extra-source-files:
source-repository head
type: git
- location: https://github.com/futurice/haskell-ansi-pretty
+ location: https://github.com/phadej/haskell-ansi-pretty
library
default-language: Haskell2010
hs-source-dirs: src
ghc-options: -Wall
build-depends:
- aeson >=0.8 && <1.5
+ aeson >=0.8 && <2.3
, ansi-wl-pprint >=0.6 && <0.7
, array >=0.5 && <0.6
- , base >=4.7 && <4.14
+ , base >=4.7 && <4.15
, bytestring >=0.10 && <0.11
, containers >=0.5 && <0.7
, generics-sop >=0.1 && <0.6
@@ -47,7 +49,7 @@ library
, text >=1.2 && <1.3
, time >=1.4 && <1.10
, unordered-containers >=0.2 && <0.3
- , vector >=0.10 && <0.13
+ , vector >=0.10 && <0.14
exposed-modules:
Data.List.CommonPrefix
diff --git a/src/Text/PrettyPrint/ANSI/Leijen/AnsiPretty.hs b/src/Text/PrettyPrint/ANSI/Leijen/AnsiPretty.hs
index 2c8d89f..dcb3a14 100644
--- a/src/Text/PrettyPrint/ANSI/Leijen/AnsiPretty.hs
+++ b/src/Text/PrettyPrint/ANSI/Leijen/AnsiPretty.hs
@@ -77,6 +77,10 @@ import qualified Data.Time as Time
import qualified Data.Vector as V
import qualified Data.Vector.Storable as S
import qualified Data.Vector.Unboxed as U
+#if MIN_VERSION_aeson(2,0,0)
+import qualified Data.Aeson.Key as Key
+import qualified Data.Aeson.KeyMap as KeyMap
+#endif
#if !MIN_VERSION_generics_sop(0,2,0)
type SListI (a :: k) = SingI a
@@ -255,7 +259,12 @@ instance AnsiPretty a => AnsiPretty (CommonPrefix a)
instance AnsiPretty Aeson.Value where
ansiPretty (Aeson.Object o)
= encloseSep (dullgreen lbrace) (dullgreen rbrace) (dullgreen comma)
- $ fmap f $ HashMap.toList o
+ $ fmap f
+#if MIN_VERSION_aeson(2,0,0)
+ $ KeyMap.toList o
+#else
+ $ HashMap.toList o
+#endif
where
f (k, v) = dullwhite (ansiPretty k) L.<> blue colon <+> ansiPretty v
@@ -272,6 +281,10 @@ instance AnsiPretty Aeson.Value where
ansiPretty (Aeson.Bool False) = dullyellow $ string "false"
ansiPretty Aeson.Null = cyan (text "Null")
+#if MIN_VERSION_aeson(2,0,0)
+instance AnsiPretty Key.Key where ansiPretty = ansiPretty . Key.toText
+#endif
+
-- array
instance (AnsiPretty i, AnsiPretty e, Array.Ix i) => AnsiPretty (Array.Array i e) where ansiPretty = ansiPrettyMap "Array" . Array.assocs
instance (AnsiPretty i, AnsiPretty e, Array.Ix i, Array.IArray Array.UArray e) => AnsiPretty (Array.UArray i e) where ansiPretty = ansiPrettyMap "UArray" . Array.assocs
@@ -302,7 +315,9 @@ instance AnsiPretty Data.Semigroup.All
instance AnsiPretty Any
instance AnsiPretty a => AnsiPretty (Sum a)
instance AnsiPretty a => AnsiPretty (Product a)
+#if !(MIN_VERSION_base(4,16,0))
instance AnsiPretty a => AnsiPretty (Option a)
+#endif
instance (AnsiPretty a, AnsiPretty b) => AnsiPretty (Arg a b)
-- scientific
diff --git a/src/Data/ArithEncode/Basic.hs b/src/Data/ArithEncode/Basic.hs
index 31bc695..e6af8ff 100644
--- a/src/Data/ArithEncode/Basic.hs
+++ b/src/Data/ArithEncode/Basic.hs
@@ -130,7 +130,7 @@ import Control.Monad
import Data.Array.IArray(Array)
import Data.Bits
import Data.Hashable
-import Data.List hiding (elem, union)
+import qualified Data.List as L hiding (elem, union)
import Data.Maybe
import Data.Set(Set)
import Data.HashSet(HashSet)
@@ -354,7 +354,7 @@ wrap :: (a -> Maybe b)
-> Encoding b
-- ^ The inner encoding.
-> Encoding a
-wrap fwd rev enc @ Encoding { encEncode = encodefunc, encDecode = decodefunc,
+wrap fwd rev enc@Encoding { encEncode = encodefunc, encDecode = decodefunc,
encInDomain = indomainfunc } =
let
safefwd val =
@@ -412,7 +412,7 @@ mandatory Encoding { encEncode = encodefunc, encDecode = decodefunc,
-- @0@. It is also similar to @mandatory@, except that it does not
-- change the base type.
nonzero :: Encoding ty -> Encoding ty
-nonzero enc @ Encoding { encEncode = encodefunc, encDecode = decodefunc,
+nonzero enc@Encoding { encEncode = encodefunc, encDecode = decodefunc,
encSize = sizeval, encInDomain = indomainfunc } =
let
dec n = n - 1
@@ -483,14 +483,14 @@ exclude :: [ty]
-- ^ The base @Encoding@.
-> Encoding ty
exclude [] enc = enc
-exclude excludes enc @ Encoding { encEncode = encodefunc, encDecode = decodefunc,
+exclude excludes enc@Encoding { encEncode = encodefunc, encDecode = decodefunc,
encSize = sizeval, encInDomain = indomainfunc } =
let
forbidden = HashSet.fromList (map encodefunc excludes)
- sortedlist = sort (map encodefunc excludes)
+ sortedlist = L.sort (map encodefunc excludes)
fwdoffsets :: [(Integer, Integer)]
- (_, fwdoffsets) = mapAccumL (\offset v -> (offset + 1, (v, offset)))
+ (_, fwdoffsets) = L.mapAccumL (\offset v -> (offset + 1, (v, offset)))
1 sortedlist
fwdtree = toBinTree fwdoffsets
@@ -499,7 +499,7 @@ exclude excludes enc @ Encoding { encEncode = encodefunc, encDecode = decodefunc
let
foldfun :: [(Integer, Integer)] -> (Integer, Integer) ->
[(Integer, Integer)]
- foldfun accum @ ((v', _) : rest) elem @ (v, _)
+ foldfun accum@((v', _) : rest) elem@(v, _)
| v == v' = elem : rest
| otherwise = elem : accum
foldfun _ _ = error "Should not fold over an empty list"
@@ -641,7 +641,7 @@ union encodings =
sortpair (a, _) (b, _) = sortfunc a b
(sizes, sortedencodings) =
- unzip (sortBy sortpair (map (\enc -> (size enc, enc)) encodings))
+ unzip (L.sortBy sortpair (map (\enc -> (size enc, enc)) encodings))
-- Turn the sorted element encodings into an array for fast access
encodingarr :: Array.Array Int (Encoding ty)
encodingarr = Array.listArray (0, numelems - 1) sortedencodings
@@ -724,7 +724,7 @@ union encodings =
_ -> error "Internal error"
encodefunc val =
- case findIndex ((flip inDomain) val) sortedencodings of
+ case L.findIndex ((flip inDomain) val) sortedencodings of
Just encidx ->
let
enc = (Array.!) encodingarr encidx
@@ -813,8 +813,8 @@ mkPairCore Encoding { encEncode = encode1, encDecode = decode1,
-- | Take encodings for two datatypes A and B, and build an encoding
-- for a pair (A, B).
pair :: Encoding ty1 -> Encoding ty2 -> Encoding (ty1, ty2)
-pair enc1 @ Encoding { encInDomain = indomain1 }
- enc2 @ Encoding { encInDomain = indomain2 } =
+pair enc1@Encoding { encInDomain = indomain1 }
+ enc2@Encoding { encInDomain = indomain2 } =
let
(encodefunc, decodefunc, sizeval) = mkPairCore enc1 enc2
@@ -1237,7 +1237,7 @@ seqCore Encoding { encEncode = encodefunc, encDecode = decodefunc,
-- Note: This encoding can produce very large numbers for short
-- sequences.
seq :: Encoding ty -> Encoding [ty]
-seq enc @ Encoding { encInDomain = indomainfunc } =
+seq enc@Encoding { encInDomain = indomainfunc } =
let
(newEncode, newDecode) = seqCore enc
newInDomain = all indomainfunc
@@ -1281,7 +1281,7 @@ boundedSeqCore len Encoding { encEncode = encodefunc, encDecode = decodefunc,
in
(newencode, newdecode)
Just 0 -> (\[] -> 0, \0 -> [])
- Just 1 -> (genericLength, flip genericReplicate (decodefunc 0))
+ Just 1 -> (L.genericLength, flip L.genericReplicate (decodefunc 0))
Just finitesize ->
let
newencode [] = 0
@@ -1324,7 +1324,7 @@ boundedSeq :: Integer
-> Encoding ty
-- ^ The @Encoding@ for the sequence elements
-> Encoding [ty]
-boundedSeq len enc @ Encoding { encSize = sizeval, encInDomain = indomainfunc } =
+boundedSeq len enc@Encoding { encSize = sizeval, encInDomain = indomainfunc } =
let
(newencode, newdecode) = boundedSeqCore len enc
newsize = case len of
diff --git a/src/Data/ArithEncode/Util.hs b/src/Data/ArithEncode/Util.hs
index 85577ad..a07ef2e 100644
--- a/src/Data/ArithEncode/Util.hs
+++ b/src/Data/ArithEncode/Util.hs
@@ -61,7 +61,7 @@ module Data.ArithEncode.Util(
import Control.Exception
import Data.ArithEncode.Basic
import Data.Hashable
-import Data.List
+import qualified Data.List as L
import Data.Maybe
import Data.Set(Set)
import Data.HashMap.Lazy(HashMap)
@@ -174,7 +174,7 @@ function keyenc valenc =
(idx + 1,
Just val' : replicate (fromInteger (idx - count)) Nothing ++ accum)
- sorted = sortBy (\(a, _) (b, _) -> compare a b)
+ sorted = L.sortBy (\(a, _) (b, _) -> compare a b)
(map (\(key, val') -> (encode keyenc key, val'))
(Map.assocs val))
@@ -217,7 +217,7 @@ functionHashable keyenc valenc =
(idx + 1,
Just val' : replicate (fromInteger (idx - count)) Nothing ++ accum)
- sorted = sortBy (\(a, _) (b, _) -> compare a b)
+ sorted = L.sortBy (\(a, _) (b, _) -> compare a b)
(map (\(key, val') -> (encode keyenc key, val'))
(HashMap.toList val))
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
name: attoparsec
version: 0.13.2.2
x-revision: 2
license: BSD3
license-file: LICENSE
category: Text, Parsing
author: Bryan O'Sullivan <bos@serpentine.com>
maintainer: Bryan O'Sullivan <bos@serpentine.com>, Ben Gamari <ben@smart-cactus.org>
stability: experimental
tested-with: GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC ==7.6.3, GHC ==7.8.4, GHC ==7.10.3, GHC ==8.0.2, GHC ==8.2.2
synopsis: Fast combinator parsing for bytestrings and text
cabal-version: >= 1.8
homepage: https://github.com/bos/attoparsec
bug-reports: https://github.com/bos/attoparsec/issues
build-type: Simple
description:
A fast parser combinator library, aimed particularly at dealing
efficiently with network protocols and complicated text/binary
file formats.
extra-source-files:
README.markdown
benchmarks/*.cabal
benchmarks/*.hs
benchmarks/*.txt
benchmarks/json-data/*.json
benchmarks/Makefile
benchmarks/med.txt.bz2
changelog.md
examples/*.c
examples/*.hs
examples/Makefile
tests/*.hs
tests/QC/*.hs
tests/QC/IPv6/*.hs
Flag developer
Description: Whether to build the library in development mode
Default: False
Manual: True
library
build-depends: array,
base >= 4.2 && < 5,
bytestring,
containers,
deepseq,
scientific >= 0.3.1 && < 0.4,
transformers >= 0.2 && (< 0.4 || >= 0.4.1.0) && < 0.6,
text >= 1.1.1.3
if impl(ghc < 7.4)
build-depends:
bytestring < 0.10.4.0
if !impl(ghc >= 8.0)
-- Data.Semigroup && Control.Monad.Fail are available in base-4.9+
build-depends: fail == 4.9.*,
semigroups >=0.16.1 && <0.19
exposed-modules: Data.Attoparsec
Data.Attoparsec.ByteString
Data.Attoparsec.ByteString.Char8
Data.Attoparsec.ByteString.Lazy
Data.Attoparsec.Char8
Data.Attoparsec.Combinator
Data.Attoparsec.Internal
Data.Attoparsec.Internal.Types
Data.Attoparsec.Lazy
Data.Attoparsec.Number
Data.Attoparsec.Text
Data.Attoparsec.Text.Lazy
Data.Attoparsec.Types
Data.Attoparsec.Zepto
other-modules: Data.Attoparsec.ByteString.Buffer
Data.Attoparsec.ByteString.FastSet
Data.Attoparsec.ByteString.Internal
Data.Attoparsec.Internal.Fhthagn
Data.Attoparsec.Text.Buffer
Data.Attoparsec.Text.FastSet
Data.Attoparsec.Text.Internal
ghc-options: -O2 -Wall
if flag(developer)
ghc-prof-options: -auto-all
ghc-options: -Werror
test-suite tests
type: exitcode-stdio-1.0
hs-source-dirs: tests .
main-is: QC.hs
other-modules: QC.Buffer
QC.ByteString
QC.Combinator
QC.Common
QC.IPv6.Internal
QC.IPv6.Types
QC.Rechunked
QC.Simple
QC.Text
QC.Text.FastSet
QC.Text.Regressions
other-modules: Data.Attoparsec.ByteString
Data.Attoparsec.ByteString.Buffer
Data.Attoparsec.ByteString.Char8
Data.Attoparsec.ByteString.FastSet
Data.Attoparsec.ByteString.Internal
Data.Attoparsec.ByteString.Lazy
Data.Attoparsec.Combinator
Data.Attoparsec.Internal
Data.Attoparsec.Internal.Fhthagn
Data.Attoparsec.Internal.Types
Data.Attoparsec.Number
Data.Attoparsec.Text
Data.Attoparsec.Text.Buffer
Data.Attoparsec.Text.FastSet
Data.Attoparsec.Text.Internal
Data.Attoparsec.Text.Lazy
Data.Attoparsec.Zepto
ghc-options:
-Wall -threaded -rtsopts
if flag(developer)
ghc-options: -Werror
build-depends:
array,
base >= 4 && < 5,
bytestring,
deepseq >= 1.1,
QuickCheck >= 2.7 && < 2.10,
quickcheck-unicode,
scientific,
tasty >= 0.11,
tasty-quickcheck >= 0.8,
text,
transformers >= 0.2 && (< 0.4 || >= 0.4.1.0) && < 0.6,
vector
if !impl(ghc >= 8.0)
-- Data.Semigroup && Control.Monad.Fail are available in base-4.9+
build-depends: fail == 4.9.*,
semigroups >=0.16.1 && <0.19
benchmark benchmarks
type: exitcode-stdio-1.0
hs-source-dirs: benchmarks benchmarks/warp-3.0.1.1 .
ghc-options: -O2 -Wall -rtsopts
main-is: Benchmarks.hs
other-modules:
Common
HeadersByteString
HeadersByteString.Atto
HeadersText
Links
Network.Wai.Handler.Warp.ReadInt
Network.Wai.Handler.Warp.RequestHeader
Numbers
Sets
TextFastSet
Warp
ghc-options: -O2 -Wall
if flag(developer)
ghc-options: -Werror
build-depends:
array,
base == 4.*,
bytestring >= 0.10.4.0,
case-insensitive,
containers,
criterion >= 1.0,
deepseq >= 1.1,
directory,
filepath,
ghc-prim,
http-types,
parsec >= 3.1.2,
scientific,
text >= 1.1.1.0,
transformers >= 0.2 && (< 0.4 || >= 0.4.1.0) && < 0.6,
unordered-containers,
vector
if !impl(ghc >= 8.0)
-- Data.Semigroup && Control.Monad.Fail are available in base-4.9+
build-depends: fail == 4.9.*,
semigroups >=0.16.1 && <0.19
source-repository head
type: git
location: https://github.com/bos/attoparsec
commit de0cf2890b9602021d6e18a2523ccdf39816d599
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Fri Mar 15 18:18:54 2019 -0400
Adapt to base-4.13.0.0
diff --git a/Data/Attoparsec/Internal/Types.hs b/Data/Attoparsec/Internal/Types.hs
index 7560f22..b848345 100644
--- a/Data/Attoparsec/Internal/Types.hs
+++ b/Data/Attoparsec/Internal/Types.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE BangPatterns, GeneralizedNewtypeDeriving, OverloadedStrings,
+{-# LANGUAGE CPP, BangPatterns, GeneralizedNewtypeDeriving, OverloadedStrings,
Rank2Types, RecordWildCards, TypeFamilies #-}
-- |
-- Module : Data.Attoparsec.Internal.Types
@@ -136,8 +136,10 @@ instance Mon.Monoid More where
mempty = Incomplete
instance Monad (Parser i) where
+#if !(MIN_VERSION_base(4,13,0))
fail = Fail.fail
{-# INLINE fail #-}
+#endif
return = App.pure
{-# INLINE return #-}
diff --git a/Data/Attoparsec/Zepto.hs b/Data/Attoparsec/Zepto.hs
index 5af5bb6..da2c244 100644
--- a/Data/Attoparsec/Zepto.hs
+++ b/Data/Attoparsec/Zepto.hs
@@ -92,8 +92,10 @@ instance Monad m => Monad (ZeptoT m) where
Fail err -> return (Fail err)
{-# INLINE (>>=) #-}
+#if !(MIN_VERSION_base(4,13,0))
fail = Fail.fail
{-# INLINE fail #-}
+#endif
instance Monad m => Fail.MonadFail (ZeptoT m) where
fail msg = Parser $ \_ -> return (Fail msg)
diff --git a/aur.cabal b/aur.cabal
index b7130e8..5acb75d 100644
--- a/aur.cabal
+++ b/aur.cabal
@@ -1,6 +1,7 @@
cabal-version: 2.2
name: aur
version: 7.0.7
+x-revision: 1
synopsis: Access metadata from the Arch Linux User Repository.
description:
Access package information from Arch Linux's AUR via its RPC interface. The
@@ -36,11 +37,11 @@ library
hs-source-dirs: lib
exposed-modules: Linux.Arch.Aur
build-depends:
- , aeson >=0.9 && <2.1
+ , aeson >=0.9 && <2.3
, bytestring
, hashable >= 1.2
, http-types ^>=0.12
- , text ^>=1.2
+ , text >=1.2
test-suite aur-test
import: commons
diff --git a/aura.cabal b/aura.cabal
index 937ba4e..1f51e64 100644
--- a/aura.cabal
+++ b/aura.cabal
@@ -43,14 +43,14 @@ common commons
, base >=4.12 && <5
, bytestring ^>=0.11
, containers ^>=0.6
- , megaparsec >=7 && <10
+ , megaparsec >=7
, rio ^>=0.1.17
, text >=1.2 && < 1.3 || ^>= 2.0
, versions ^>=6.0.3
common libexec
build-depends:
- , aeson >=2.1 && < 2.3
+ , aeson >=2.1
, aur ^>=7.0.5
, http-client >=0.5 && <0.8
, prettyprinter >=1.2 && <1.8
@@ -58,7 +58,7 @@ common libexec
, scheduler >=1.1 && <2.1
, transformers ^>=0.5
, typed-process ^>=0.2
- , unix ^>=2.7.2.2
+ , unix >=2.7.2.2
library
import: commons, libexec
@@ -90,14 +90,14 @@ library
Aura.Utils
build-depends:
- , algebraic-graphs >=0.1 && <0.8
- , filepath ^>=1.4
+ , algebraic-graphs >=0.1
+ , filepath >=1.4
, hashable ^>=1.4
, http-types >=0.9 && <0.13
- , language-bash >=0.8 && <0.10
+ , language-bash >=0.8
, network-uri ^>=2.6
, stm ^>=2.5
- , time >=1.8 && <1.13
+ , time >=1.8
executable aura
import: commons, libexec
diff --git a/src/Barbies/TH.hs b/src/Barbies/TH.hs
index b1b4622..1199ae7 100644
--- a/src/Barbies/TH.hs
+++ b/src/Barbies/TH.hs
@@ -258,7 +258,7 @@ declareBareBWith DeclareBareBConfig{..} decsQ = do
[ (strat, pure t) | (_, DerivClause strat preds) <- classes', t <- preds ]
return $ DataD [] dataName
#if MIN_VERSION_template_haskell(2,17,0)
- (tvbs ++ [PlainTV nSwitch (), KindedTV nWrap () (AppT (AppT ArrowT StarT) StarT)])
+ (tvbs ++ [PlainTV nSwitch bndrReq, KindedTV nWrap bndrReq (AppT (AppT ArrowT StarT) StarT)])
#else
(tvbs ++ [PlainTV nSwitch, KindedTV nWrap (AppT (AppT ArrowT StarT) StarT)])
#endif
@@ -270,6 +270,12 @@ declareBareBWith DeclareBareBConfig{..} decsQ = do
++ [ TySynD (mkName name) tvbs coveredType | name <- maybeToList $ coveredName $ nameBase dataName0]
go _ d = pure [d]
+-- TODO (int-index): Use MIN_VERSION_template_haskell(2,21,0)
+#if __GLASGOW_HASKELL__ < 907
+bndrReq :: ()
+bndrReq = ()
+#endif
+
dataDecNames :: [Dec] -> [Name]
dataDecNames = nub . mapMaybe decName
where
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 (..)
diff -ru bencode-0.6.0.0.orig/src/Data/BEncode/Parser.hs bencode-0.6.0.0/src/Data/BEncode/Parser.hs
--- bencode-0.6.0.0.orig/src/Data/BEncode/Parser.hs 2015-05-09 15:56:43.000000000 -0400
+++ bencode-0.6.0.0/src/Data/BEncode/Parser.hs 2019-05-17 14:32:05.074495583 -0400
@@ -1,3 +1,5 @@
+{-# LANGUAGE CPP #-}
+
-----------------------------------------------------------------------------
-- |
-- Module : BParser
@@ -26,6 +28,7 @@
import Control.Applicative hiding (optional)
import Control.Monad
+import qualified Control.Monad.Fail as Fail
import Data.BEncode
import qualified Data.ByteString.Lazy.Char8 as L
import qualified Data.Map as Map
@@ -61,6 +64,11 @@
Ok a b' -> runB (f a) b'
Error str -> Error str
return val = BParser $ Ok val
+#if !(MIN_VERSION_base(4,13,0))
+ fail = Fail.fail
+#endif
+
+instance Fail.MonadFail BParser where
fail str = BParser $ \_ -> Error str
instance Functor BParser where
diff --git a/src/Data/Tuple/Unboxed.hs b/src/Data/Tuple/Unboxed.hs
index c27e1db..49720e2 100644
--- a/src/Data/Tuple/Unboxed.hs
+++ b/src/Data/Tuple/Unboxed.hs
@@ -76,7 +76,7 @@
-------------------------------------------------------------------------------
module Data.Tuple.Unboxed where
-import GHC.Prim
+import GHC.Exts
#if WORD_SIZE_IN_BITS >= 32
#define INT32 Int#
diff --git a/src/Data/Tuple/Unboxed/Rep.hs b/src/Data/Tuple/Unboxed/Rep.hs
index fd4796a..342f784 100644
--- a/src/Data/Tuple/Unboxed/Rep.hs
+++ b/src/Data/Tuple/Unboxed/Rep.hs
@@ -12,7 +12,7 @@
-- Stability : experimental
-- Portability : non-portable
--
--- This module provides an ad-hoc polymorphic alternative to the functions in
+-- This module provides an ad-hoc polymorphic alternative to the functions in
-- "Data.Tuple.Unboxed". The functions have the same basic signature, but using
-- GHC 8.0+ features they are made parametrically polymorphic within each fixed
-- representation/calling convention.
@@ -30,6 +30,9 @@ module Data.Tuple.Unboxed.Rep
import Data.Kind
import GHC.Prim
import GHC.Exts
+#if MIN_VERSION_ghc_prim(0,8,0)
+import GHC.Types (UnliftedRep)
+#endif
#if __GLASGOW_HASKELL__ >= 802
type VoidRep = TupleRep '[]
diff --git a/bv-sized.cabal b/bv-sized.cabal
index 5ff840f..9a6222c 100644
--- a/bv-sized.cabal
+++ b/bv-sized.cabal
@@ -32,7 +32,7 @@ library
deepseq >= 1.4.0 && < 1.5.0,
panic >= 0.4.0 && < 0.5,
parameterized-utils >= 2.0.2 && < 2.2,
- random >= 1.2.0 && < 1.3,
+ random >= 1.3.0 && < 1.4,
th-lift >= 0.8.1 && < 0.9
hs-source-dirs: src
default-language: Haskell2010
diff --git a/src/Data/BitVector/Sized/Signed.hs b/src/Data/BitVector/Sized/Signed.hs
index 691d248..05c8ade 100644
--- a/src/Data/BitVector/Sized/Signed.hs
+++ b/src/Data/BitVector/Sized/Signed.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
@@ -141,6 +142,10 @@ instance KnownNat w => Uniform (SignedBV w) where
instance (KnownNat w, 1 <= w) => UniformRange (SignedBV w) where
uniformRM (SignedBV lo, SignedBV hi) g =
SignedBV <$> BV.sUniformRM knownNat (lo, hi) g
+#if MIN_VERSION_random(1,3,0)
+ isInRange (lo, hi) x =
+ lo <= x && x <= hi
+#endif
instance (KnownNat w, 1 <= w) => Random (SignedBV w)
diff --git a/src/Data/BitVector/Sized/Unsigned.hs b/src/Data/BitVector/Sized/Unsigned.hs
index 65f3ece..f9cb94f 100644
--- a/src/Data/BitVector/Sized/Unsigned.hs
+++ b/src/Data/BitVector/Sized/Unsigned.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
@@ -132,6 +133,10 @@ instance KnownNat w => Uniform (UnsignedBV w) where
instance UniformRange (UnsignedBV w) where
uniformRM (UnsignedBV lo, UnsignedBV hi) g =
UnsignedBV <$> BV.uUniformRM (lo, hi) g
+#if MIN_VERSION_random(1,3,0)
+ isInRange (lo, hi) x =
+ lo <= x && x <= hi
+#endif
instance KnownNat w => Random (UnsignedBV w)
commit 3bbc80a8a708886f593c9591197d43191e7f31ba
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Fri Mar 15 14:09:31 2019 -0400
Adapt to base-4.13.0.0
diff --git a/src/Data/Bytes/Get.hs b/src/Data/Bytes/Get.hs
index 6ab1a04..fd5e26b 100644
--- a/src/Data/Bytes/Get.hs
+++ b/src/Data/Bytes/Get.hs
@@ -28,6 +28,7 @@ module Data.Bytes.Get
#if __GLASGOW_HASKELL__ < 710
import Control.Applicative
#endif
+import qualified Control.Monad.Fail as Fail
import Control.Monad.Reader
import Control.Monad.Trans.Except as Except
import Control.Monad.RWS.Lazy as Lazy
@@ -43,7 +44,7 @@ import Data.Int
import qualified Data.Serialize.Get as S
import Data.Word
-class (Integral (Remaining m), Monad m, Applicative m) => MonadGet m where
+class (Integral (Remaining m), Fail.MonadFail m, Applicative m) => MonadGet m where
-- | An 'Integral' number type used for unchecked skips and counting.
type Remaining m :: *
diff --git a/src/Data/Bytes/Serial.hs b/src/Data/Bytes/Serial.hs
index a669f15..b032665 100644
--- a/src/Data/Bytes/Serial.hs
+++ b/src/Data/Bytes/Serial.hs
@@ -594,7 +594,7 @@ instance GSerial U1 where
gdeserialize = return U1
instance GSerial V1 where
- gserialize _ = fail "I looked into the void."
+ gserialize _ = error "I looked into the void."
gdeserialize = fail "I looked into the void."
instance (GSerial f, GSerial g) => GSerial (f :*: g) where
@@ -772,7 +772,7 @@ instance GSerial1 U1 where
gdeserializeWith _ = return U1
instance GSerial1 V1 where
- gserializeWith _ = fail "I looked into the void."
+ gserializeWith _ = error "I looked into the void."
gdeserializeWith _ = fail "I looked into the void."
instance (GSerial1 f, GSerial1 g) => GSerial1 (f :*: g) where
diff -ru bytestring-mmap-0.2.2.orig/System/IO/Posix/MMap/Lazy.hs bytestring-mmap-0.2.2/System/IO/Posix/MMap/Lazy.hs
--- bytestring-mmap-0.2.2.orig/System/IO/Posix/MMap/Lazy.hs 2011-04-29 15:58:05.000000000 -0400
+++ bytestring-mmap-0.2.2/System/IO/Posix/MMap/Lazy.hs 2018-05-20 14:44:47.123915525 -0400
@@ -91,7 +91,11 @@
--
unsafeMMapFile :: FilePath -> IO ByteString
unsafeMMapFile path = do
- fd <- openFd path ReadOnly Nothing defaultFileFlags
+ fd <- openFd path ReadOnly
+#if !(MIN_VERSION_unix(2,8,0))
+ Nothing
+#endif
+ defaultFileFlags
always (closeFd fd) $ do
stat <- getFdStatus fd
let size = fromIntegral (fileSize stat)
diff -ru bytestring-mmap-0.2.2.orig/System/IO/Posix/MMap.hs bytestring-mmap-0.2.2/System/IO/Posix/MMap.hs
--- bytestring-mmap-0.2.2.orig/System/IO/Posix/MMap.hs 2011-04-29 15:58:05.000000000 -0400
+++ bytestring-mmap-0.2.2/System/IO/Posix/MMap.hs 2018-05-20 14:44:17.671914783 -0400
@@ -1,4 +1,4 @@
-{-# LANGUAGE ForeignFunctionInterface #-}
+{-# LANGUAGE CPP, ForeignFunctionInterface #-}
--------------------------------------------------------------------
-- |
-- Module : System.IO.Posix.MMap
@@ -98,7 +98,11 @@
--
unsafeMMapFile :: FilePath -> IO ByteString
unsafeMMapFile f = do
- fd <- openFd f ReadOnly Nothing defaultFileFlags
+ fd <- openFd f ReadOnly
+#if !(MIN_VERSION_unix(2,8,0))
+ Nothing
+#endif
+ defaultFileFlags
always (closeFd fd) $ do
stat <- getFdStatus fd
let size = fromIntegral (fileSize stat)
commit 79490be79c4ad2e07fc8e43a9887fc21f1907f76
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Wed Jun 12 18:52:03 2019 -0400
Allow building with Cabal-3.0.*
diff --git a/src/Distribution/Extra/Doctest.hs b/src/Distribution/Extra/Doctest.hs
index 1beb9d2..94ca62b 100644
--- a/src/Distribution/Extra/Doctest.hs
+++ b/src/Distribution/Extra/Doctest.hs
@@ -69,8 +69,10 @@ import Distribution.PackageDescription
PackageDescription (), TestSuite (..))
import Distribution.Simple
(UserHooks (..), autoconfUserHooks, defaultMainWithHooks, simpleUserHooks)
+#if !(MIN_VERSION_Cabal(3,0,0))
import Distribution.Simple.BuildPaths
(autogenModulesDir)
+#endif
import Distribution.Simple.Compiler
(PackageDB (..), showCompilerId)
import Distribution.Simple.LocalBuildInfo
@@ -79,7 +81,11 @@ import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.Setup
(BuildFlags (buildDistPref, buildVerbosity), HaddockFlags (haddockDistPref, haddockVerbosity), fromFlag, emptyBuildFlags)
import Distribution.Simple.Utils
- (createDirectoryIfMissingVerbose, findFile, rewriteFile)
+ (createDirectoryIfMissingVerbose, findFile)
+#if !(MIN_VERSION_Cabal(3,0,0))
+import Distribution.Simple.Utils
+ (rewriteFile)
+#endif
import Distribution.Text
(display, simpleParse)
import System.FilePath
@@ -103,6 +109,9 @@ import Distribution.Types.GenericPackageDescription
import Distribution.PackageDescription
(CondTree (..))
#endif
+#if MIN_VERSION_Cabal(2,5,0)
+import Distribution.Types.LibraryName (libraryNameString)
+#endif
#if MIN_VERSION_directory(1,2,2)
import System.Directory
@@ -432,7 +441,9 @@ generateBuildModule testSuiteName flags pkg lbi = do
isSpecific _ = False
mbLibraryName :: Library -> Name
-#if MIN_VERSION_Cabal(2,0,0)
+#if MIN_VERSION_Cabal(2,5,0)
+ mbLibraryName = NameLib . fmap unUnqualComponentName . libraryNameString . libName
+#elif MIN_VERSION_Cabal(2,0,0)
-- Cabal-2.0 introduced internal libraries, which are named.
mbLibraryName = NameLib . fmap unUnqualComponentName . libName
#else
cabal-version: 1.12
Name: cassava
Version: 0.5.1.0
x-revision: 1
Synopsis: A CSV parsing and encoding library
Description: {
@cassava@ is a library for parsing and encoding [RFC 4180](https://tools.ietf.org/html/rfc4180)
compliant [comma-separated values (CSV)](https://en.wikipedia.org/wiki/Comma-separated_values) data,
which is a textual line-oriented format commonly used for exchanging tabular data.
.
@cassava@'s API includes support for
.
- Index-based record-conversion
- Name-based record-conversion
- Typeclass directed conversion of fields and records
- Built-in field-conversion instances for standard types
- Customizable record-conversion instance derivation via GHC generics
- Low-level [bytestring](https://hackage.haskell.org/package/bytestring) builders (see "Data.Csv.Builder")
- Incremental decoding and encoding API (see "Data.Csv.Incremental")
- Streaming API for constant-space decoding (see "Data.Csv.Streaming")
.
Moreover, this library is designed to be easy to use; for instance, here's a
very simple example of encoding CSV data:
.
>>> Data.Csv.encode [("John",27),("Jane",28)]
"John,27\r\nJane,28\r\n"
.
Please refer to the documentation in "Data.Csv" and the included [README](#readme) for more usage examples.
}
Homepage: https://github.com/hvr/cassava
License: BSD3
License-file: LICENSE
Bug-reports: https://github.com/hvr/cassava/issues
Copyright: (c) 2012 Johan Tibell
(c) 2012 Bryan O'Sullivan
(c) 2011 MailRank, Inc.
Author: Johan Tibell
Maintainer: hvr@gnu.org
Category: Text, Web, CSV
Build-type: Simple
Extra-source-files: examples/*.hs,
CHANGES.md,
README.md
Tested-with: GHC ==8.2.1, GHC ==8.0.2, GHC ==8.0.1, GHC ==7.10.3, GHC ==7.8.4, GHC ==7.6.3, GHC ==7.4.2
----------------------------------------------------------------------------
source-repository head
type: git
location: https://github.com/hvr/cassava.git
flag bytestring--LT-0_10_4
description: [bytestring](https://hackage.haskell.org/haskell/package/bytestring) < 0.10.4
manual: True
default: False
Library
default-language: Haskell2010
other-extensions:
BangPatterns
CPP
DataKinds
DefaultSignatures
DeriveFunctor
FlexibleContexts
FlexibleInstances
KindSignatures
MultiParamTypeClasses
OverloadedStrings
PolyKinds
Rank2Types
ScopedTypeVariables
TypeOperators
UndecidableInstances
if impl(ghc >= 8.0)
other-extensions:
DataKinds
PolyKinds
Exposed-modules:
Data.Csv
Data.Csv.Builder
Data.Csv.Incremental
Data.Csv.Parser
Data.Csv.Streaming
Other-modules:
Data.Csv.Conversion
Data.Csv.Conversion.Internal
Data.Csv.Encoding
Data.Csv.Types
Data.Csv.Util
Build-depends:
array >= 0.4 && < 0.6,
attoparsec >= 0.11.3.0 && < 0.14,
base >= 4.5 && < 5,
bytestring >= 0.9.2 && < 0.11,
containers >= 0.4.2 && < 0.7,
deepseq >= 1.1 && < 1.5,
hashable < 1.3,
scientific >= 0.3.4.7 && < 0.4,
text < 1.3,
unordered-containers < 0.3,
vector >= 0.8 && < 0.13,
Only >= 0.1 && < 0.1.1
if flag(bytestring--LT-0_10_4)
build-depends: bytestring < 0.10.4
, bytestring-builder >= 0.10.8 && < 0.11
else
build-depends: bytestring >= 0.10.4
, text-short == 0.1.*
-- GHC.Generics lived in `ghc-prim` for GHC 7.2 & GHC 7.4 only
if impl(ghc < 7.6)
build-depends: ghc-prim == 0.2.*
-- For Numeric.Natural
if impl(ghc < 7.10)
build-depends: nats >= 1 && < 1.2
-- https://ghc.haskell.org/trac/ghc/wiki/Migration/8.0#Recommendationsforforward-compatibility
if impl(ghc >= 8.0)
ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances
else
-- provide/emulate `Control.Monad.Fail` and `Data.Semigroups` API for pre-GHC8
build-depends: fail == 4.9.*, semigroups == 0.18.*
if impl(ghc >= 8.2)
ghc-options: -Wcpp-undef
ghc-options: -Wall -O2
----------------------------------------------------------------------------
Test-suite unit-tests
default-language: Haskell2010
Type: exitcode-stdio-1.0
Main-is: UnitTests.hs
-- dependencies with version constraints inherited via lib:cassava
Build-depends: attoparsec
, base
, bytestring
, cassava
, hashable
, scientific
, text
, unordered-containers
, vector
-- extra dependencies not already used by lib:cassava
build-depends: HUnit < 1.7
, QuickCheck == 2.10.*
, quickcheck-instances >= 0.3.12 && < 0.4
, test-framework == 0.8.*
, test-framework-hunit == 0.3.*
, test-framework-quickcheck2 == 0.3.*
hs-source-dirs: tests
-- GHC.Generics lived in `ghc-prim` for GHC 7.2 & GHC 7.4 only
if impl(ghc < 7.6)
build-depends: ghc-prim == 0.2.*
-- For Numeric.Natural
if impl(ghc < 7.10)
build-depends: nats >= 1 && < 1.2
-- https://ghc.haskell.org/trac/ghc/wiki/Migration/8.0#Recommendationsforforward-compatibility
if impl(ghc >= 8.0)
ghc-options: -Wcompat -Wnoncanonical-monad-instances -Wnoncanonical-monadfail-instances
else
-- provide/emulate `Control.Monad.Fail` and `Data.Semigroups` API for pre-GHC8
build-depends: fail == 4.9.*, semigroups == 0.18.*
if impl(ghc >= 8.2)
ghc-options: -Wcpp-undef
ghc-options: -Wall
diff -ru cassava-0.5.1.0.orig/Data/Csv/Conversion.hs cassava-0.5.1.0/Data/Csv/Conversion.hs
--- cassava-0.5.1.0.orig/Data/Csv/Conversion.hs 2017-08-12 12:05:04.000000000 -0400
+++ cassava-0.5.1.0/Data/Csv/Conversion.hs 2019-03-15 19:00:40.945760943 -0400
@@ -1188,8 +1188,10 @@
{-# INLINE (>>) #-}
return = pure
{-# INLINE return #-}
+#if !(MIN_VERSION_base(4,13,0))
fail = Fail.fail
{-# INLINE fail #-}
+#endif
-- | @since 0.5.0.0
instance Fail.MonadFail Parser where
diff -ru cborg-0.2.1.0.orig/src/Codec/CBOR/Decoding.hs cborg-0.2.1.0/src/Codec/CBOR/Decoding.hs
--- cborg-0.2.1.0.orig/src/Codec/CBOR/Decoding.hs 2018-10-11 17:10:04.000000000 -0400
+++ cborg-0.2.1.0/src/Codec/CBOR/Decoding.hs 2019-03-16 07:38:16.792667620 -0400
@@ -282,7 +282,9 @@
{-# INLINE (>>) #-}
(>>) = (*>)
+#if !(MIN_VERSION_base(4,13,0))
fail = Fail.fail
+#endif
-- | @since 0.2.0.0
instance Fail.MonadFail (Decoder s) where
@@ -828,14 +830,14 @@
decodeListLenCanonicalOf = decodeListLenOfHelper decodeListLenCanonical
{-# INLINE decodeListLenCanonicalOf #-}
-decodeListLenOfHelper :: (Show a, Eq a, Monad m) => m a -> a -> m ()
+decodeListLenOfHelper :: (Show a, Eq a, Fail.MonadFail m) => m a -> a -> m ()
decodeListLenOfHelper decodeFun = \len -> do
len' <- decodeFun
if len == len' then return ()
else fail $ "expected list of length " ++ show len
{-# INLINE decodeListLenOfHelper #-}
-decodeWordOfHelper :: (Show a, Eq a, Monad m) => m a -> a -> m ()
+decodeWordOfHelper :: (Show a, Eq a, Fail.MonadFail m) => m a -> a -> m ()
decodeWordOfHelper decodeFun = \n -> do
n' <- decodeFun
if n == n' then return ()
diff -ru cborg-0.2.1.0.orig/src/Codec/CBOR/Pretty.hs cborg-0.2.1.0/src/Codec/CBOR/Pretty.hs
--- cborg-0.2.1.0.orig/src/Codec/CBOR/Pretty.hs 2018-10-11 17:10:04.000000000 -0400
+++ cborg-0.2.1.0/src/Codec/CBOR/Pretty.hs 2019-03-16 07:38:42.156935413 -0400
@@ -103,7 +103,9 @@
Right (toks', ind', ss', x) -> let PP g' = g x
in g' toks' ind' ss'
return = pure
+#if !(MIN_VERSION_base(4,13,0))
fail = Fail.fail
+#endif
instance Fail.MonadFail PP where
fail s = PP $ \_ _ _ -> Left s