Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
de31c19c
Commit
de31c19c
authored
Sep 06, 2013
by
quchen
Committed by
thoughtpolice
Sep 09, 2013
Browse files
Fix AMP warnings
parent
239a6f30
Changes
2
Hide whitespace changes
Inline
Side-by-side
Cabal/Distribution/Compat/ReadP.hs
View file @
de31c19c
...
...
@@ -69,9 +69,9 @@ module Distribution.Compat.ReadP
)
where
import
Control.Monad
(
MonadPlus
(
..
),
liftM2
,
ap
)
import
Control.Monad
(
MonadPlus
(
..
),
liftM
,
liftM2
,
ap
)
import
Data.Char
(
isSpace
)
import
Control.Applicative
(
Applicative
(
..
))
import
Control.Applicative
(
Applicative
(
..
)
,
Alternative
(
empty
,
(
<|>
))
)
infixr
5
+++
,
<++
...
...
@@ -89,7 +89,7 @@ data P s a
-- Monad, MonadPlus
instance
Functor
(
P
s
)
where
fmap
f
x
=
x
>>=
return
.
f
fmap
=
liftM
instance
Applicative
(
P
s
)
where
pure
=
return
...
...
@@ -106,6 +106,10 @@ instance Monad (P s) where
fail
_
=
Fail
instance
Alternative
(
P
s
)
where
empty
=
mzero
(
<|>
)
=
mplus
instance
MonadPlus
(
P
s
)
where
mzero
=
Fail
...
...
Cabal/Distribution/Simple/BuildTarget.hs
View file @
de31c19c
...
...
@@ -55,7 +55,7 @@ import Data.Either
(
partitionEithers
)
import
qualified
Data.Map
as
Map
import
Control.Monad
import
Control.Applicative
(
Applicative
(
..
))
import
Control.Applicative
(
Applicative
(
..
)
,
Alternative
(
..
)
)
import
qualified
Distribution.Compat.ReadP
as
Parse
import
Distribution.Compat.ReadP
(
(
+++
),
(
<++
)
)
...
...
@@ -745,6 +745,10 @@ data MatchError = MatchErrorExpected String String
deriving
(
Show
,
Eq
)
instance
Alternative
Match
where
empty
=
mzero
(
<|>
)
=
mplus
instance
MonadPlus
Match
where
mzero
=
matchZero
mplus
=
matchPlus
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment