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 428 additions and 446 deletions
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 --git a/charsetdetect.cabal b/charsetdetect.cabal
index 4c765ef..6e1565f 100644
--- a/charsetdetect.cabal
+++ b/charsetdetect.cabal
@@ -76,7 +76,10 @@ Library
cc-options: -fno-weak
c-sources: cbits/dso_handle.c
- extra-libraries: stdc++
+ if impl(ghc >= 9.4)
+ build-depends: system-cxx-std-lib
+ else
+ extra-libraries: stdc++
Include-Dirs: libcharsetdetect
libcharsetdetect/mozilla/extensions/universalchardet/src/base
diff --git a/charsetdetect-ae.cabal b/charsetdetect-ae.cabal
index 7655545..da839db 100644
--- a/charsetdetect-ae.cabal
+++ b/charsetdetect-ae.cabal
@@ -80,17 +80,20 @@ Library
cc-options: -fno-weak
c-sources: cbits/dso_handle.c
- -- This is a bit dodgy since g++ might link in more stuff, but will probably work in practice:
- if os(windows)
- if arch(x86_64)
- extra-libraries: stdc++-6 gcc_s_seh-1
- else
- extra-libraries: stdc++-6 gcc_s_dw2-1
+ if impl(ghc >= 9.4)
+ build-depends: system-cxx-std-lib
else
- if os(darwin)
- extra-libraries: c++
+ -- This is a bit dodgy since g++ might link in more stuff, but will probably work in practice:
+ if os(windows)
+ if arch(x86_64)
+ extra-libraries: stdc++-6 gcc_s_seh-1
+ else
+ extra-libraries: stdc++-6 gcc_s_dw2-1
else
- extra-libraries: stdc++
+ if os(darwin)
+ extra-libraries: c++
+ else
+ extra-libraries: stdc++
Include-Dirs: libcharsetdetect
libcharsetdetect/mozilla/extensions/universalchardet/src/base
diff --git a/Data/Concurrent/Deque/ChaseLev.hs b/Data/Concurrent/Deque/ChaseLev.hs
index 5a21a5b..071f4b7 100644
--- a/Data/Concurrent/Deque/ChaseLev.hs
+++ b/Data/Concurrent/Deque/ChaseLev.hs
@@ -40,7 +40,7 @@ import System.IO.Unsafe (unsafePerformIO)
import Text.Printf (printf)
import System.Mem.StableName (makeStableName, hashStableName)
import GHC.Exts (Int(I#))
-import GHC.Prim (reallyUnsafePtrEquality#, unsafeCoerce#)
+import GHC.Exts (reallyUnsafePtrEquality#, unsafeCoerce#)
--------------------------------------------------------------------------------
-- Instances
diff --git a/Data/Concurrent/Deque/ChaseLevUnboxed.hs b/Data/Concurrent/Deque/ChaseLevUnboxed.hs
index 2817f7a..ef268a0 100644
--- a/Data/Concurrent/Deque/ChaseLevUnboxed.hs
+++ b/Data/Concurrent/Deque/ChaseLevUnboxed.hs
@@ -42,7 +42,7 @@ import System.IO.Unsafe (unsafePerformIO)
import Text.Printf (printf)
import System.Mem.StableName (makeStableName, hashStableName)
import GHC.Exts (Int(I#))
-import GHC.Prim (reallyUnsafePtrEquality#, unsafeCoerce#)
+import GHC.Exts (reallyUnsafePtrEquality#, unsafeCoerce#)
--------------------------------------------------------------------------------
-- Instances
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 ->
diff --git a/containers.cabal b/containers.cabal
index e601943..c176468 100644
--- a/containers.cabal
+++ b/containers.cabal
@@ -33,7 +33,7 @@ source-repository head
Library
default-language: Haskell2010
- build-depends: base >= 4.9.1 && < 5, array >= 0.4.0.0, deepseq >= 1.2 && < 1.5, template-haskell
+ build-depends: base >= 4.9.1 && < 5, array >= 0.4.0.0, deepseq >= 1.2 && < 1.6, template-haskell
hs-source-dirs: src
ghc-options: -O2 -Wall -fwarn-incomplete-uni-patterns -fwarn-incomplete-record-updates
diff --git a/src/Data/IntMap/Internal.hs b/src/Data/IntMap/Internal.hs
index 75d0264..c771259 100644
--- a/src/Data/IntMap/Internal.hs
+++ b/src/Data/IntMap/Internal.hs
@@ -311,7 +311,7 @@ import Data.Bits
import qualified Data.Foldable as Foldable
import Data.Maybe (fromMaybe)
import Utils.Containers.Internal.Prelude hiding
- (lookup, map, filter, foldr, foldl, null)
+ (lookup, map, filter, foldr, foldl, foldl', null)
import Prelude ()
import Data.IntSet.Internal (Key)
diff --git a/src/Data/IntMap/Lazy.hs b/src/Data/IntMap/Lazy.hs
index ef5a1c0..6158f87 100644
--- a/src/Data/IntMap/Lazy.hs
+++ b/src/Data/IntMap/Lazy.hs
@@ -172,8 +172,8 @@ module Data.IntMap.Lazy (
, foldMapWithKey
-- ** Strict folds
- , foldr'
- , foldl'
+ , IM.foldr'
+ , IM.foldl'
, foldrWithKey'
, foldlWithKey'
diff --git a/src/Data/IntMap/Strict/Internal.hs b/src/Data/IntMap/Strict/Internal.hs
index a20c49a..bfae645 100644
--- a/src/Data/IntMap/Strict/Internal.hs
+++ b/src/Data/IntMap/Strict/Internal.hs
@@ -260,7 +260,7 @@ module Data.IntMap.Strict.Internal (
) where
import Utils.Containers.Internal.Prelude hiding
- (lookup,map,filter,foldr,foldl,null)
+ (lookup,map,filter,foldr,foldl,foldl',null)
import Prelude ()
import Data.Bits
diff --git a/src/Data/IntSet.hs b/src/Data/IntSet.hs
index a7b36b3..4a08fd5 100644
--- a/src/Data/IntSet.hs
+++ b/src/Data/IntSet.hs
@@ -128,8 +128,8 @@ module Data.IntSet (
, IS.foldr
, IS.foldl
-- ** Strict folds
- , foldr'
- , foldl'
+ , IS.foldr'
+ , IS.foldl'
-- ** Legacy folds
, fold
diff --git a/src/Data/IntSet/Internal.hs b/src/Data/IntSet/Internal.hs
index 740a4ec..7d613a2 100644
--- a/src/Data/IntSet/Internal.hs
+++ b/src/Data/IntSet/Internal.hs
@@ -204,7 +204,7 @@ import Data.Semigroup (Semigroup((<>)))
#endif
import Data.Semigroup (stimesIdempotentMonoid)
import Utils.Containers.Internal.Prelude hiding
- (filter, foldr, foldl, null, map)
+ (filter, foldr, foldl, foldl', null, map)
import Prelude ()
import Utils.Containers.Internal.BitUtil
diff --git a/src/Data/Map/Internal.hs b/src/Data/Map/Internal.hs
index b45288e..f801b1a 100644
--- a/src/Data/Map/Internal.hs
+++ b/src/Data/Map/Internal.hs
@@ -384,7 +384,7 @@ import qualified Data.Foldable as Foldable
import Data.Bifoldable
#endif
import Utils.Containers.Internal.Prelude hiding
- (lookup, map, filter, foldr, foldl, null, splitAt, take, drop)
+ (lookup, map, filter, foldr, foldl, foldl', null, splitAt, take, drop)
import Prelude ()
import qualified Data.Set.Internal as Set
diff --git a/src/Data/Map/Strict/Internal.hs b/src/Data/Map/Strict/Internal.hs
index 9ef3fab..18a8293 100644
--- a/src/Data/Map/Strict/Internal.hs
+++ b/src/Data/Map/Strict/Internal.hs
@@ -308,7 +308,9 @@ module Data.Map.Strict.Internal
, valid
) where
-import Prelude hiding (lookup,map,filter,foldr,foldl,null,take,drop,splitAt)
+import Utils.Containers.Internal.Prelude hiding
+ (lookup,map,filter,foldr,foldl,foldl',null,take,drop,splitAt)
+import Prelude ()
import Data.Map.Internal
( Map (..)
diff --git a/src/Data/Sequence/Internal.hs b/src/Data/Sequence/Internal.hs
index 8d58920..29c827b 100644
--- a/src/Data/Sequence/Internal.hs
+++ b/src/Data/Sequence/Internal.hs
@@ -199,8 +199,8 @@ import Utils.Containers.Internal.Prelude hiding (
#if MIN_VERSION_base(4,11,0)
(<>),
#endif
- (<$>), foldMap, Monoid,
- null, length, lookup, take, drop, splitAt, foldl, foldl1, foldr, foldr1,
+ (<$>), Monoid,
+ null, length, lookup, take, drop, splitAt,
scanl, scanl1, scanr, scanr1, replicate, zip, zipWith, zip3, zipWith3,
unzip, takeWhile, dropWhile, iterate, reverse, filter, mapM, sum, all)
import Prelude ()
@@ -212,7 +212,7 @@ import Control.Monad (MonadPlus(..))
import Data.Monoid (Monoid(..))
import Data.Functor (Functor(..))
import Utils.Containers.Internal.State (State(..), execState)
-import Data.Foldable (Foldable(foldl, foldl1, foldr, foldr1, foldMap, foldl', foldr'), toList)
+import Data.Foldable (foldr', toList)
import qualified Data.Foldable as F
import qualified Data.Semigroup as Semigroup
diff --git a/src/Data/Set.hs b/src/Data/Set.hs
index 0b4bc57..a946eb5 100644
--- a/src/Data/Set.hs
+++ b/src/Data/Set.hs
@@ -141,8 +141,8 @@ module Data.Set (
, S.foldr
, S.foldl
-- ** Strict folds
- , foldr'
- , foldl'
+ , S.foldr'
+ , S.foldl'
-- ** Legacy folds
, fold
diff --git a/src/Data/Set/Internal.hs b/src/Data/Set/Internal.hs
index 1748a87..4501c08 100644
--- a/src/Data/Set/Internal.hs
+++ b/src/Data/Set/Internal.hs
@@ -233,7 +233,7 @@ module Data.Set.Internal (
) where
import Utils.Containers.Internal.Prelude hiding
- (filter,foldl,foldr,null,map,take,drop,splitAt)
+ (filter,foldl,foldl',foldr,null,map,take,drop,splitAt)
import Prelude ()
import Control.Applicative (Const(..))
import qualified Data.List as List
diff --git a/src/Data/Tree.hs b/src/Data/Tree.hs
index 3f174fc..18f690f 100644
--- a/src/Data/Tree.hs
+++ b/src/Data/Tree.hs
@@ -55,7 +55,7 @@ module Data.Tree(
import Utils.Containers.Internal.Prelude as Prelude
import Prelude ()
-import Data.Foldable (fold, foldl', toList)
+import Data.Foldable (fold, toList)
import Data.Traversable (foldMapDefault)
import Control.Monad (liftM)
import Control.Monad.Fix (MonadFix (..), fix)
diff --git a/src/Utils/Containers/Internal/Prelude.hs b/src/Utils/Containers/Internal/Prelude.hs
index 8c19bbf..30bf0ea 100644
--- a/src/Utils/Containers/Internal/Prelude.hs
+++ b/src/Utils/Containers/Internal/Prelude.hs
@@ -4,14 +4,16 @@
module Utils.Containers.Internal.Prelude
( module Prelude
, Applicative (..)
+ , Foldable (..)
#if !MIN_VERSION_base(4,10,0)
, liftA2
#endif
)
where
-import Prelude hiding (Applicative(..))
+import Prelude hiding (Applicative(..), Foldable(..))
import Control.Applicative(Applicative(..))
+import Data.Foldable (Foldable(elem, foldMap, foldr, foldl, foldl', foldr1, foldl1, maximum, minimum, product, sum, null, length))
#if !MIN_VERSION_base(4,10,0)
import Control.Applicative(liftA2)
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 1138d062235185f05d76d3ce701662c0d22ab345
Author: Ryan Scott <ryan.gl.scott@gmail.com>
Date: Sat Dec 29 22:22:52 2018 -0500
Allow building with template-haskell-2.15.0.0
diff --git a/src/Database/CQL/Protocol/Record.hs b/src/Database/CQL/Protocol/Record.hs
index c69e454..d4ad7f2 100644
--- a/src/Database/CQL/Protocol/Record.hs
+++ b/src/Database/CQL/Protocol/Record.hs
@@ -13,8 +13,10 @@ import Language.Haskell.TH
typeSynDecl :: Name -> [Type] -> Type -> Dec
#if __GLASGOW_HASKELL__ < 708
typeSynDecl = TySynInstD
-#else
+#elif __GLASGOW_HASKELL__ < 807
typeSynDecl x y z = TySynInstD x (TySynEqn y z)
+#else
+typeSynDecl x y z = TySynInstD (TySynEqn Nothing (foldl AppT (ConT x) y) z)
#endif
type family TupleType a
diff -ru critbit-0.2.0.0.orig/Data/CritBit/Set.hs critbit-0.2.0.0/Data/CritBit/Set.hs diff --git a/Data/CritBit/Set.hs b/Data/CritBit/Set.hs
--- critbit-0.2.0.0.orig/Data/CritBit/Set.hs 2014-07-04 01:40:10.000000000 -0400 index 0039925..0bfc74d 100644
+++ critbit-0.2.0.0/Data/CritBit/Set.hs 2018-01-07 18:44:32.747084107 -0500 --- a/Data/CritBit/Set.hs
@@ -1,3 +1,4 @@ +++ b/Data/CritBit/Set.hs
+{-# LANGUAGE CPP #-} @@ -90,16 +90,20 @@ import Data.CritBit.Types.Internal (CritBit(..), Set(..), CritBitKey, Node(..))
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- |
@@ -90,6 +91,9 @@
import Data.Foldable (Foldable, foldMap) import Data.Foldable (Foldable, foldMap)
import Data.Maybe (isJust) import Data.Maybe (isJust)
import Data.Monoid (Monoid(..)) import Data.Monoid (Monoid(..))
+#if MIN_VERSION_base(4,9,0) -import Prelude hiding (null, filter, map, foldl, foldr)
+import Data.Semigroup (Semigroup(..)) +import Data.Semigroup (Semigroup(..))
+#endif +import Prelude hiding (null, filter, map, foldl, foldr, foldl')
import Prelude hiding (null, filter, map, foldl, foldr)
import qualified Data.CritBit.Tree as T import qualified Data.CritBit.Tree as T
import qualified Data.List as List import qualified Data.List as List
@@ -97,9 +101,16 @@
instance (Show a) => Show (Set a) where instance (Show a) => Show (Set a) where
show s = "fromList " ++ show (toList s) show s = "fromList " ++ show (toList s)
+#if MIN_VERSION_base(4,9,0)
+instance CritBitKey k => Semigroup (Set k) where +instance CritBitKey k => Semigroup (Set k) where
+ (<>) = union + (<>) = union
+#endif
+ +
instance CritBitKey k => Monoid (Set k) where instance CritBitKey k => Monoid (Set k) where
mempty = empty mempty = empty
+#if !(MIN_VERSION_base(4,11,0)) - mappend = union
mappend = union + mappend = (<>)
+#endif
mconcat = unions mconcat = unions
instance Foldable Set where instance Foldable Set where
diff -ru critbit-0.2.0.0.orig/Data/CritBit/Tree.hs critbit-0.2.0.0/Data/CritBit/Tree.hs diff --git a/Data/CritBit/Tree.hs b/Data/CritBit/Tree.hs
--- critbit-0.2.0.0.orig/Data/CritBit/Tree.hs 2014-07-04 01:40:10.000000000 -0400 index e50738b..7c1b205 100644
+++ critbit-0.2.0.0/Data/CritBit/Tree.hs 2018-01-07 18:43:26.219082431 -0500 --- a/Data/CritBit/Tree.hs
@@ -1,4 +1,4 @@ +++ b/Data/CritBit/Tree.hs
-{-# LANGUAGE BangPatterns, RecordWildCards, ScopedTypeVariables #-} @@ -153,15 +153,19 @@ import Data.CritBit.Core
+{-# LANGUAGE CPP, BangPatterns, RecordWildCards, ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
-- |
@@ -153,21 +153,31 @@
import Data.CritBit.Types.Internal import Data.CritBit.Types.Internal
import Data.Maybe (fromMaybe) import Data.Maybe (fromMaybe)
import Data.Monoid (Monoid(..)) import Data.Monoid (Monoid(..))
+#if MIN_VERSION_base(4,9,0)
+import Data.Semigroup (Semigroup(..)) +import Data.Semigroup (Semigroup(..))
+#endif
import Data.Traversable (Traversable(traverse)) import Data.Traversable (Traversable(traverse))
import Prelude hiding (foldl, foldr, lookup, null, map, filter) -import Prelude hiding (foldl, foldr, lookup, null, map, filter)
+import Prelude hiding (foldl, foldr, lookup, null, map, filter, foldl')
import qualified Data.Array as A import qualified Data.Array as A
import qualified Data.Foldable as Foldable import qualified Data.Foldable as Foldable
import qualified Data.List as List import qualified Data.List as List
+#if MIN_VERSION_base(4,9,0)
+instance CritBitKey k => Semigroup (CritBit k v) where +instance CritBitKey k => Semigroup (CritBit k v) where
+ (<>) = union + (<>) = union
+#endif
+ +
instance CritBitKey k => Monoid (CritBit k v) where instance CritBitKey k => Monoid (CritBit k v) where
mempty = empty mempty = empty
+#if !(MIN_VERSION_base(4,11,0)) - mappend = union
mappend = union + mappend = (<>)
+#endif
mconcat = unions mconcat = unions
instance CritBitKey k => Traversable (CritBit k) where instance CritBitKey k => Traversable (CritBit k) where
traverse f m = traverseWithKey (\_ v -> f v) m diff --git a/Data/CritBit/Types/Internal.hs b/Data/CritBit/Types/Internal.hs
index d278b5a..d537ad6 100644
--- a/Data/CritBit/Types/Internal.hs
+++ b/Data/CritBit/Types/Internal.hs
@@ -185,15 +185,25 @@ instance CritBitKey ByteString where
{-# INLINE getByte #-}
-infixl 9 !, \\ instance CritBitKey Text where
+infixl 9 !, \\ -- Comment needed here to avoid CPP bug +#if MIN_VERSION_text(2,0,0)
+ byteCount (Text _ _ len) = len
-- | /O(k)/. Find the value at a key. +#else
-- Calls 'error' when the element can not be found. byteCount (Text _ _ len) = len `shiftL` 1
@@ -1248,8 +1258,7 @@ +#endif
-- > deleteFindMin Error: can not return the minimal element of an empty map {-# INLINE byteCount #-}
deleteFindMin :: CritBit k v -> ((k, v), CritBit k v)
deleteFindMin = fromMaybe (error msg) . minViewWithKey
- where msg = "CritBit.deleteFindMin: cannot return the minimal \
- \element of an empty map"
+ where msg = "CritBit.deleteFindMin: cannot return the minimal element of an empty map"
{-# INLINABLE deleteFindMin #-}
-- | /O(k)/. Delete and find the maximal element. +#if MIN_VERSION_text(2,0,0)
@@ -1258,8 +1267,7 @@ + getByte (Text arr off len) n
-- > deleteFindMax Error: can not return the maximal element of an empty map + | n < len = fromIntegral (T.unsafeIndex arr (off + n)) .|. 256
deleteFindMax :: CritBit k v -> ((k, v), CritBit k v) + | otherwise = 0
deleteFindMax = fromMaybe (error msg) . maxViewWithKey +#else
- where msg = "CritBit.deleteFindMax: cannot return the minimal \ getByte (Text arr off len) n
- \element of an empty map" | n < len `shiftL` 1 =
+ where msg = "CritBit.deleteFindMax: cannot return the minimal element of an empty map" let word = T.unsafeIndex arr (off + (n `shiftR` 1))
{-# INLINABLE deleteFindMax #-} byteInWord = (word `shiftR` ((n .&. 1) `shiftL` 3)) .&. 0xff
in byteInWord .|. 256
| otherwise = 0
+#endif
{-# INLINE getByte #-}
-- | /O(k')/. Retrieves the value associated with minimal key of the #if WORD_SIZE_IN_BITS == 64
diff -ru crypto-random-0.0.9.orig/Crypto/Random/Entropy/Unix.hs crypto-random-0.0.9/Crypto/Random/Entropy/Unix.hs diff --git a/Crypto/Random/Entropy/Unix.hs b/Crypto/Random/Entropy/Unix.hs
--- crypto-random-0.0.9.orig/Crypto/Random/Entropy/Unix.hs 2015-03-18 09:42:48.000000000 -0400 index 42e7d8c..7777952 100644
+++ crypto-random-0.0.9/Crypto/Random/Entropy/Unix.hs 2018-05-07 10:10:49.039215536 -0400 --- a/Crypto/Random/Entropy/Unix.hs
+++ b/Crypto/Random/Entropy/Unix.hs
@@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
-- Stability : experimental -- Stability : experimental
-- Portability : Good -- Portability : Good
...@@ -9,7 +10,7 @@ diff -ru crypto-random-0.0.9.orig/Crypto/Random/Entropy/Unix.hs crypto-random-0. ...@@ -9,7 +10,7 @@ diff -ru crypto-random-0.0.9.orig/Crypto/Random/Entropy/Unix.hs crypto-random-0.
{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE ScopedTypeVariables #-}
module Crypto.Random.Entropy.Unix module Crypto.Random.Entropy.Unix
( DevRandom ( DevRandom
@@ -22,10 +23,10 @@ @@ -22,10 +23,10 @@ import System.Posix.IO
type H = Fd type H = Fd
type DeviceName = String type DeviceName = String
...@@ -22,7 +23,7 @@ diff -ru crypto-random-0.0.9.orig/Crypto/Random/Entropy/Unix.hs crypto-random-0. ...@@ -22,7 +23,7 @@ diff -ru crypto-random-0.0.9.orig/Crypto/Random/Entropy/Unix.hs crypto-random-0.
newtype DevURandom = DevURandom DeviceName newtype DevURandom = DevURandom DeviceName
instance EntropySource DevRandom where instance EntropySource DevRandom where
@@ -48,7 +49,11 @@ @@ -48,7 +49,11 @@ testOpen filepath = do
Just h -> closeDev h >> return (Just filepath) Just h -> closeDev h >> return (Just filepath)
openDev :: String -> IO (Maybe H) openDev :: String -> IO (Maybe H)
......
diff --git a/src/Cryptol/Eval/FFI/GenHeader.hs b/src/Cryptol/Eval/FFI/GenHeader.hs
index b02388f..036b584 100644
--- a/src/Cryptol/Eval/FFI/GenHeader.hs
+++ b/src/Cryptol/Eval/FFI/GenHeader.hs
@@ -9,9 +9,9 @@ module Cryptol.Eval.FFI.GenHeader
) where
import Control.Monad.Writer.Strict
-import Data.Functor
+import Data.Functor ((<&>))
import Data.Char(isAlphaNum)
-import Data.List
+import Data.List (mapAccumL)
import Data.Set (Set)
import qualified Data.Set as Set
import Language.C99.Pretty as C
diff --git a/src/Data/Default/Instances/Base/New.hs b/src/Data/Default/Instances/Base/New.hs
index 52b0a28..a1feb23 100644
--- a/src/Data/Default/Instances/Base/New.hs
+++ b/src/Data/Default/Instances/Base/New.hs
@@ -52,7 +52,9 @@ import Data.Maybe (Maybe(Nothing))
import Data.Semigroup
( Min
, Max
+# if !(MIN_VERSION_base(4,16,0))
, Option(Option)
+# endif
)
#else
import Control.Applicative (Const(Const))
@@ -127,9 +129,11 @@ instance Bounded a => Default (Min a) where
instance Bounded a => Default (Max a) where
def = maxBound
+# if !(MIN_VERSION_base(4,16,0))
-- | @'def' = 'Option' 'Nothing'@
instance Default (Option a) where
def = Option Nothing
+# endif
#endif
-- $providedInstances
diff -ru data-dword-0.3.1.2.orig/src/Data/DoubleWord/TH.hs data-dword-0.3.1.2/src/Data/DoubleWord/TH.hs
--- data-dword-0.3.1.2.orig/src/Data/DoubleWord/TH.hs 2018-01-13 13:49:48.000000000 -0500
+++ data-dword-0.3.1.2/src/Data/DoubleWord/TH.hs 2019-05-02 16:32:16.395011833 -0400
@@ -25,6 +25,9 @@
import Language.Haskell.TH hiding (unpacked, match)
import Data.BinaryWord (BinaryWord(..))
import Data.DoubleWord.Base
+#if MIN_VERSION_template_haskell(2,15,0)
+import Data.List (foldl')
+#endif
-- | Declare signed and unsigned binary word types built from
-- the specified low and high halves. The high halves /must/ have
@@ -1378,8 +1381,12 @@
hi' = mkName "hi'"
lo' = mkName "lo'"
tpT = ConT tp
+
+ tySynInst :: Name -> [Type] -> Type -> Dec
tySynInst n ps t =
-#if MIN_VERSION_template_haskell(2,9,0)
+#if MIN_VERSION_template_haskell(2,15,0)
+ TySynInstD (TySynEqn Nothing (foldl' AppT (ConT n) ps) t)
+#elif MIN_VERSION_template_haskell(2,9,0)
TySynInstD n (TySynEqn ps t)
#else
TySynInstD n ps t
@@ -1448,11 +1455,19 @@
#endif
singE e = appC '(:) [e, ConE '[]]
mkRules = do
- let idRule = RuleP ("fromIntegral/" ++ show tp ++ "->" ++ show tp) []
+ let idRule = RuleP ("fromIntegral/" ++ show tp ++ "->" ++ show tp)
+#if MIN_VERSION_template_haskell(2,15,0)
+ Nothing
+#endif
+ []
(VarE 'fromIntegral)
(SigE (VarE 'id) (AppT (AppT ArrowT tpT) tpT))
AllPhases
- signRule = RuleP ("fromIntegral/" ++ show tp ++ "->" ++ show otp) []
+ signRule = RuleP ("fromIntegral/" ++ show tp ++ "->" ++ show otp)
+#if MIN_VERSION_template_haskell(2,15,0)
+ Nothing
+#endif
+ []
(VarE 'fromIntegral)
(SigE (VarE (if signed then 'unsignedWord
else 'signedWord))
@@ -1464,11 +1479,17 @@
(VarE 'signExtendLo)
mkRules' rules t narrowE extE signExtE = do
let narrowRule = RuleP ("fromIntegral/" ++ show tp ++ "->" ++ showT t)
+#if MIN_VERSION_template_haskell(2,15,0)
+ Nothing
+#endif
[]
(VarE 'fromIntegral)
(SigE narrowE (AppT (AppT ArrowT tpT) t))
AllPhases
extRule = RuleP ("fromIntegral/" ++ showT t ++ "->" ++ show tp)
+#if MIN_VERSION_template_haskell(2,15,0)
+ Nothing
+#endif
[]
(VarE 'fromIntegral)
(SigE extE (AppT (AppT ArrowT t) tpT))
@@ -1476,18 +1497,26 @@
signedRules ← do
insts ← reifyInstances ''SignedWord [t]
case insts of
-#if MIN_VERSION_template_haskell(2,9,0)
+#if MIN_VERSION_template_haskell(2,15,0)
+ [TySynInstD (TySynEqn _ _ signT)] -> return $
+#elif MIN_VERSION_template_haskell(2,9,0)
[TySynInstD _ (TySynEqn _ signT)] → return $
#else
[TySynInstD _ _ signT] → return $
#endif
[ RuleP ("fromIntegral/" ++ show tp ++ "->" ++ showT signT)
+#if MIN_VERSION_template_haskell(2,15,0)
+ Nothing
+#endif
[]
(VarE 'fromIntegral)
(SigE (AppE (appVN '(.) ['signedWord]) narrowE)
(AppT (AppT ArrowT tpT) signT))
AllPhases
, RuleP ("fromIntegral/" ++ showT signT ++ "->" ++ show tp)
+#if MIN_VERSION_template_haskell(2,15,0)
+ Nothing
+#endif
[]
(VarE 'fromIntegral)
(SigE signExtE (AppT (AppT ArrowT signT) tpT))
@@ -1501,6 +1530,9 @@
sSmallT = ConT sSmallName in
[ RuleP ("fromIntegral/" ++
show tp ++ "->" ++ show uSmallName)
+#if MIN_VERSION_template_haskell(2,15,0)
+ Nothing
+#endif
[]
(VarE 'fromIntegral)
(SigE (appV '(.) [VarE 'fromIntegral, narrowE])
@@ -1508,6 +1540,9 @@
AllPhases
, RuleP ("fromIntegral/" ++
show uSmallName ++ "->" ++ show tp)
+#if MIN_VERSION_template_haskell(2,15,0)
+ Nothing
+#endif
[]
(VarE 'fromIntegral)
(SigE (appV '(.) [extE, VarE 'fromIntegral])
@@ -1515,6 +1550,9 @@
AllPhases
, RuleP ("fromIntegral/" ++
show tp ++ "->" ++ show sSmallName)
+#if MIN_VERSION_template_haskell(2,15,0)
+ Nothing
+#endif
[]
(VarE 'fromIntegral)
(SigE (appV '(.) [VarE 'fromIntegral, narrowE])
@@ -1522,6 +1560,9 @@
AllPhases
, RuleP ("fromIntegral/" ++
show sSmallName ++ "->" ++ show tp)
+#if MIN_VERSION_template_haskell(2,15,0)
+ Nothing
+#endif
[]
(VarE 'fromIntegral)
(SigE (appV '(.) [signExtE, VarE 'fromIntegral])
@@ -1532,7 +1573,9 @@
_ → do
insts ← reifyInstances ''LoWord [t]
case insts of
-#if MIN_VERSION_template_haskell(2,9,0)
+#if MIN_VERSION_template_haskell(2,15,0)
+ [TySynInstD (TySynEqn _ _ t')] ->
+#elif MIN_VERSION_template_haskell(2,9,0)
[TySynInstD _ (TySynEqn _ t')] →
#else
[TySynInstD _ _ t'] →
diff --git a/Data/RTree/Base.hs b/Data/RTree/Base.hs
index 36c041b..9df462f 100644
--- a/Data/RTree/Base.hs
+++ b/Data/RTree/Base.hs
@@ -83,11 +83,11 @@ import Prelude hiding (length, lookup, map, null)
import Data.RTree.MBB hiding (mbb)
data RTree a =
- Node4 {getMBB :: {-# UNPACK #-} ! MBB, getC1 :: ! (RTree a), getC2 :: ! (RTree a), getC3 :: ! (RTree a), getC4 :: ! (RTree a) }
- | Node3 {getMBB :: {-# UNPACK #-} ! MBB, getC1 :: ! (RTree a), getC2 :: ! (RTree a), getC3 :: ! (RTree a) }
- | Node2 {getMBB :: {-# UNPACK #-} ! MBB, getC1 :: ! (RTree a), getC2 :: ! (RTree a) }
+ Node4 {getMBB :: {-# UNPACK #-} !MBB, getC1 :: !(RTree a), getC2 :: !(RTree a), getC3 :: !(RTree a), getC4 :: !(RTree a) }
+ | Node3 {getMBB :: {-# UNPACK #-} !MBB, getC1 :: !(RTree a), getC2 :: !(RTree a), getC3 :: !(RTree a) }
+ | Node2 {getMBB :: {-# UNPACK #-} !MBB, getC1 :: !(RTree a), getC2 :: !(RTree a) }
| Node {getMBB :: MBB, getChildren' :: [RTree a] }
- | Leaf {getMBB :: {-# UNPACK #-} ! MBB, getElem :: a}
+ | Leaf {getMBB :: {-# UNPACK #-} !MBB, getElem :: a}
| Empty
deriving (Show, Eq, Typeable, Generic, Functor)
diff --git a/Data/RTree/MBB.hs b/Data/RTree/MBB.hs
index 03548dd..209cc7d 100644
--- a/Data/RTree/MBB.hs
+++ b/Data/RTree/MBB.hs
@@ -34,7 +34,7 @@ import Data.Binary
import GHC.Generics (Generic)
-- | Minimal bounding box
-data MBB = MBB {getUlx :: {-# UNPACK #-} ! Double, getUly :: {-# UNPACK #-} ! Double, getBrx :: {-# UNPACK #-} ! Double, getBry :: {-# UNPACK #-} ! Double}
+data MBB = MBB {getUlx :: {-# UNPACK #-} !Double, getUly :: {-# UNPACK #-} !Double, getBrx :: {-# UNPACK #-} !Double, getBry :: {-# UNPACK #-} !Double}
deriving (Eq, Generic, Ord)
-- | created a minimal bounding box (or a rectangle)
diff --git a/src/Data/DateTime.hs b/src/Data/DateTime.hs
index d587f50..bab5379 100644
--- a/src/Data/DateTime.hs
+++ b/src/Data/DateTime.hs
@@ -116,7 +116,7 @@ formatDateTime :: String -> DateTime -> String
formatDateTime = formatTime defaultTimeLocale
parseDateTime :: String -> String -> Maybe DateTime
-parseDateTime = parseTime defaultTimeLocale
+parseDateTime = parseTimeM True defaultTimeLocale
sqlFormat :: String
sqlFormat = iso8601DateFormat (Just "%T")
diff --git a/Data/DeriveLiftedInstances/Internal.hs b/Data/DeriveLiftedInstances/Internal.hs
index 7816a59..3429941 100644
--- a/Data/DeriveLiftedInstances/Internal.hs
+++ b/Data/DeriveLiftedInstances/Internal.hs
@@ -148,8 +148,10 @@ contains :: Data d => Name -> d -> Bool
contains nm = gmapQl (||) False (\d -> maybe (contains nm d) (== nm) $ cast d)
+#if !MIN_VERSION_template_haskell(2,22,1)
deriving instance Lift Fixity
deriving instance Lift FixityDirection
+#endif
-- | Helper for showing infix expressions
data ShowsPrec = ShowsPrec (Int -> String -> String) | ShowOp2 Fixity (Int -> String -> String) | ShowOp1 Fixity (Int -> String -> String)