Gentoo Archives: gentoo-commits

From: "Sergei Trofimovich (slyfox)" <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-haskell/top/files: top-1.7-ghc-7.10.patch
Date: Sat, 01 Aug 2015 11:56:54
Message-Id: 20150801115649.58499116@oystercatcher.gentoo.org
1 slyfox 15/08/01 11:56:49
2
3 Added: top-1.7-ghc-7.10.patch
4 Log:
5 Constraint solving framework employed by the Helium Compiler, a depend for new dev-lang/helium-1.8.1.
6
7 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 611FF3AA)
8
9 Revision Changes Path
10 1.1 dev-haskell/top/files/top-1.7-ghc-7.10.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/top/files/top-1.7-ghc-7.10.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-haskell/top/files/top-1.7-ghc-7.10.patch?rev=1.1&content-type=text/plain
14
15 Index: top-1.7-ghc-7.10.patch
16 ===================================================================
17 diff --git a/src/Top/Implementation/TypeGraph/DefaultHeuristics.hs b/src/Top/Implementation/TypeGraph/DefaultHeuristics.hs
18 index 2cc5210..faf4c8c 100644
19 --- a/src/Top/Implementation/TypeGraph/DefaultHeuristics.hs
20 +++ b/src/Top/Implementation/TypeGraph/DefaultHeuristics.hs
21 @@ -1,2 +1,3 @@
22 +{-# LANGUAGE FlexibleContexts #-}
23 -----------------------------------------------------------------------------
24 -- | License : GPL
25 diff --git a/src/Top/Monad/Select.hs b/src/Top/Monad/Select.hs
26 index e5953cb..72276b4 100644
27 --- a/src/Top/Monad/Select.hs
28 +++ b/src/Top/Monad/Select.hs
29 @@ -16,4 +16,6 @@ module Top.Monad.Select
30 import Top.Util.Embedding
31 import Control.Monad.State
32 +import Control.Monad
33 +import Control.Applicative
34
35 --------------------------------------------------------
36 @@ -22,4 +24,11 @@ import Control.Monad.State
37 newtype Select t m a = Select (m a)
38
39 +instance Monad m => Functor (Select t m) where
40 + fmap = liftM
41 +
42 +instance Monad m => Applicative (Select t m) where
43 + pure = return
44 + (<*>) = ap -- defined in Control.Monad
45 +
46 instance Monad m => Monad (Select t m) where
47 return a = Select (return a)
48 @@ -43,4 +52,11 @@ select = Select
49 data SelectFix (t :: (* -> *) -> *) (m :: * -> *) a = SelectFix (m a)
50
51 +instance Monad m => Functor (SelectFix t m) where
52 + fmap = liftM
53 +
54 +instance Monad m => Applicative (SelectFix t m) where
55 + pure = return
56 + (<*>) = ap -- defined in Control.Monad
57 +
58 instance Monad m => Monad (SelectFix t m) where
59 return a = SelectFix (return a)
60 diff --git a/src/Top/Monad/StateFix.hs b/src/Top/Monad/StateFix.hs
61 index d77919d..bd8fb76 100644
62 --- a/src/Top/Monad/StateFix.hs
63 +++ b/src/Top/Monad/StateFix.hs
64 @@ -16,4 +16,6 @@ import Control.Monad.State
65 import Control.Monad.Identity
66 import Control.Monad.Writer
67 +import Control.Monad
68 +import Control.Applicative
69
70 type StateFix s = StateFixT s Identity
71 @@ -21,4 +23,11 @@ type StateFix s = StateFixT s Identity
72 data StateFixT s m a = Fix { unFix :: StateT (s (StateFixT s m)) m a }
73
74 +instance Monad m => Functor (StateFixT s m) where
75 + fmap = liftM
76 +
77 +instance Monad m => Applicative (StateFixT s m) where
78 + pure = return
79 + (<*>) = ap -- defined in Control.Monad
80 +
81 instance Monad m => Monad (StateFixT s m) where
82 return = Fix . return