on iko/ghcjs-patch-master help sign in
adds 864 patches
commit69ad0f1d2813319c48dfd06e43182c67fc3fe39b authorMoritz Angermann <moritz.angermann@gmail.com> dateFri 5 Apr 2019, 21:52 (8 years ago) parentd4ef903
5 files changed+195
patches/ghc864/binary-0.8.6.0.patch+20 patches/ghc864/containers-0.6.0.1.patch+117 patches/ghc864/default.nix+4 patches/ghc864/hpc-0.6.0.3.patch+18 patches/ghc864/parsec-3.1.13.0.patch+36
patches/ghc864/binary-0.8.6.0.patchnew file+20
@@ -0,0 +1,20 @@
1+diff --git a/binary.cabal b/binary.cabal
2+index 9b25877..1d1b9cf 100644
3+--- a/binary.cabal
4++++ b/binary.cabal
5+@@ -158,7 +158,6 @@ benchmark get
6+ Data.Binary.Class
7+ Data.Binary.FloatCast
8+ Data.Binary.Generic
9+- Data.Binary.Get
10+ Data.Binary.Get.Internal
11+ Data.Binary.Internal
12+ Data.Binary.Put
13+@@ -191,7 +190,6 @@ benchmark put
14+ Data.Binary.Get
15+ Data.Binary.Get.Internal
16+ Data.Binary.Internal
17+- Data.Binary.Put
18+ build-depends:
19+ base >= 4.5.0.0 && < 5,
20+ bytestring >= 0.10.4,
patches/ghc864/containers-0.6.0.1.patchnew file+117
@@ -0,0 +1,117 @@
1+diff --git a/tests/graph-properties.hs b/tests/graph-properties.hs
2+deleted file mode 100644
3+index ffe4483..0000000
4+--- a/tests/graph-properties.hs
5++++ /dev/null
6+@@ -1,111 +0,0 @@
7+-{-# LANGUAGE CPP #-}
8+-
9+-import Data.Graph as G
10+-
11+-import Control.Applicative (Const(Const, getConst), pure, (<$>), (<*>), liftA2)
12+-
13+-import Test.Framework
14+-import Test.Framework.Providers.QuickCheck2
15+-import Test.QuickCheck
16+-import Test.QuickCheck.Function (Fun (..), apply)
17+-import Test.QuickCheck.Poly (A, B, C)
18+-import Control.Monad (ap)
19+-
20+-default (Int)
21+-
22+-main :: IO ()
23+-main = defaultMain
24+- [
25+- testProperty "monad_id1" prop_monad_id1
26+- , testProperty "monad_id2" prop_monad_id2
27+- , testProperty "monad_assoc" prop_monad_assoc
28+- , testProperty "ap_ap" prop_ap_ap
29+- , testProperty "ap_liftA2" prop_ap_liftA2
30+- , testProperty "monadFix_ls" prop_monadFix_ls
31+- ]
32+-
33+-{--------------------------------------------------------------------
34+- Arbitrary trees
35+---------------------------------------------------------------------}
36+-
37+-newtype G = G Graph
38+-
39+--- This instance isn't balanced very well; the trees will probably tend
40+--- to lean left. But it's better than nothing and we can fix it later.
41+-instance Arbitrary a => Arbitrary G where
42+- arbitrary = sized arbgraph
43+- where
44+- arbgraph :: Arbitrary a => Int -> Gen G
45+- arbgraph nv = do
46+- lo <- arbitrary
47+- hi <- (lo+) <$> choose (0, nv)
48+-{-
49+- arbtree 0 = fmap ((,) 1) $ Node <$> arbitrary <*> pure []
50+- arbtree n = do
51+- root <- arbitrary
52+- num_children <- choose (0, n - 1)
53+- (st, tl) <- go num_children
54+- return (1+st, Node root tl)
55+--}
56+-
57+- go 0 = pure (0, [])
58+- go n = do
59+- (sh, hd) <- arbtree n
60+- (st, tl) <- go (n - sh)
61+- pure (sh + st, hd : tl)
62+-
63+--- genericShrink only became available when generics did, so it's
64+--- not available under GHC 7.0.
65+-#if __GLASGOW_HASKELL__ >= 704
66+- shrink = genericShrink
67+-#endif
68+-
69+-----------------------------------------------------------------
70+--- Unit tests
71+-----------------------------------------------------------------
72+-
73+-----------------------------------------------------------------
74+--- QuickCheck
75+-----------------------------------------------------------------
76+-
77+-apply2 :: Fun (a, b) c -> a -> b -> c
78+-apply2 f a b = apply f (a, b)
79+-
80+-prop_ap_ap :: Tree (Fun A B) -> Tree A -> Property
81+-prop_ap_ap fs xs = (apply <$> fs <*> xs) === ((apply <$> fs) `ap` xs)
82+-
83+-prop_ap_liftA2 :: Fun (A, B) C -> Tree A -> Tree B -> Property
84+-prop_ap_liftA2 f as bs = (apply2 f <$> as <*> bs) === liftA2 (apply2 f) as bs
85+-
86+-prop_monad_id1 :: Tree A -> Property
87+-prop_monad_id1 t = (t >>= pure) === t
88+-
89+-prop_monad_id2 :: A -> Fun A (Tree B) -> Property
90+-prop_monad_id2 a f = (pure a >>= apply f) === apply f a
91+-
92+-prop_monad_assoc :: Tree A -> Fun A (Tree B) -> Fun B (Tree C) -> Property
93+-prop_monad_assoc ta atb btc =
94+- ((ta >>= apply atb) >>= apply btc)
95+- ===
96+- (ta >>= \a -> apply atb a >>= apply btc)
97+-
98+--- The left shrinking law
99+---
100+--- This test is kind of wonky and unprincipled, because it's
101+--- rather tricky to construct test cases!
102+--- This is the most important MonadFix law to test because it's the
103+--- least intuitive by far, and because it's the only one that's
104+--- sensitive to the Monad instance.
105+-prop_monadFix_ls :: Int -> Tree Int -> Fun Int (Tree Int) -> Property
106+-prop_monadFix_ls val ta ti =
107+- fmap ($val) (mfix (\x -> ta >>= \y -> f x y))
108+- ===
109+- fmap ($val) (ta >>= \y -> mfix (\x -> f x y))
110+- where
111+- fact :: Int -> (Int -> Int) -> Int -> Int
112+- fact x _ 0 = x + 1
113+- fact x f n = x + n * f ((n - 1) `mod` 23)
114+-
115+- f :: (Int -> Int) -> Int -> Tree (Int -> Int)
116+- f q y = let t = apply ti y
117+- in fmap (\w -> fact w q) t
patches/ghc864/default.nix+4
@@ -1,2 +1,6 @@
11{
2+ packages.binary.patches = [ ({ version, revision }: if version == "0.8.6.0" && revision == 0 then ./binary-0.8.6.0.patch else null) ];
3+ packages.containers.patches = [ ({ version, revision }: if version == "0.6.0.1" && revision == 0 then ./containers-0.6.0.1.patch else null) ];
4+ packages.hpc.patches = [ ({ version, revision }: if version == "0.6.0.3" && revision == 0 then ./hpc-0.6.0.3.patch else null) ];
5+ packages.parsec.patches = [ ({ version, revision }: if version == "3.1.13.0" && revision == 0 then ./parsec-3.1.13.0.patch else null) ];
26}
patches/ghc864/hpc-0.6.0.3.patchnew file+18
@@ -0,0 +1,18 @@
1+diff --git a/hpc.cabal b/hpc.cabal
2+index 7e77973..ba676a7 100644
3+--- a/hpc.cabal
4++++ b/hpc.cabal
5+@@ -35,9 +35,9 @@ Library
6+ Trace.Hpc.Reflect
7+
8+ Build-Depends:
9+- base >= 4.4.1 && < 4.10,
10+- containers >= 0.4.1 && < 0.6,
11+- directory >= 1.1 && < 1.3,
12++ base >= 4.4.1 && < 4.13,
13++ containers >= 0.4.1 && < 0.7,
14++ directory >= 1.1 && < 1.4,
15+ filepath >= 1 && < 1.5,
16+- time >= 1.2 && < 1.7
17++ time >= 1.2 && < 1.9
18+ ghc-options: -Wall
patches/ghc864/parsec-3.1.13.0.patchnew file+36
@@ -0,0 +1,36 @@
1+diff --git a/parsec.cabal b/parsec.cabal
2+index 9531768..46ef625 100644
3+--- a/parsec.cabal
4++++ b/parsec.cabal
5+@@ -21,18 +21,18 @@ license: BSD3
6+ license-file: LICENSE
7+ author: Daan Leijen <daan@microsoft.com>, Paolo Martini <paolo@nemail.it>, Antoine Latter <aslatter@gmail.com>
8+ maintainer: Herbert Valerio Riedel <hvr@gnu.org>
9+-homepage: https://github.com/hvr/parsec
10+-bug-reports: https://github.com/hvr/parsec/issues
11++homepage: https://github.com/haskell/parsec
12++bug-reports: https://github.com/haskell/parsec/issues
13+ category: Parsing
14+
15+ build-type: Simple
16+-tested-with: GHC ==8.4.1 || ==8.2.2 || ==8.0.2 || ==7.10.3 || ==7.8.4 || ==7.6.3 || ==7.4.2
17++tested-with: GHC ==8.6.1 || ==8.4.3 || ==8.2.2 || ==8.0.2 || ==7.10.3 || ==7.8.4 || ==7.6.3 || ==7.4.2 || ==7.4.1
18+
19+ extra-source-files: ChangeLog.md, README.md
20+
21+ source-repository head
22+ type: git
23+- location: https://github.com/hvr/parsec
24++ location: https://github.com/haskell/parsec
25+
26+ library
27+ hs-source-dirs: src
28+@@ -64,7 +64,7 @@ library
29+ Text.ParserCombinators.Parsec.Token
30+
31+ build-depends:
32+- base >= 4.5.1 && < 4.12,
33++ base >= 4.5.0 && < 4.13,
34+ mtl >= 1.1.1 && < 2.3,
35+ bytestring >= 0.9.2.1 && < 0.11,
36+ text >= 0.11.3 && < 1.3