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
4761562f
Commit
4761562f
authored
Jul 11, 2013
by
Benno Fünfstück
Browse files
Apply suggestions from byorgey
parent
016d1335
Changes
2
Hide whitespace changes
Inline
Side-by-side
Cabal/Distribution/PackageDescription/Parse.hs
View file @
4761562f
...
...
@@ -74,6 +74,7 @@ import Data.Monoid ( Monoid(..) )
import
Data.List
(
nub
,
unfoldr
,
partition
,
(
\\
))
import
Control.Monad
(
liftM
,
foldM
,
when
,
unless
,
ap
)
import
Control.Applicative
(
Applicative
(
..
))
import
Control.Arrow
(
first
)
import
System.Directory
(
doesFileExist
)
import
qualified
Data.ByteString.Lazy.Char8
as
BS.Char8
...
...
@@ -604,7 +605,7 @@ buildInfoNames = map fieldName binfoFieldDescrs
newtype
StT
s
m
a
=
StT
{
runStT
::
s
->
m
(
a
,
s
)
}
instance
Functor
f
=>
Functor
(
StT
s
f
)
where
fmap
g
(
StT
f
)
=
StT
$
\
s
->
fmap
(
\
(
a
,
s'
)
->
(
g
a
,
s'
))
$
f
s
fmap
g
(
StT
f
)
=
StT
$
fmap
(
first
g
)
.
f
instance
(
Monad
m
,
Functor
m
)
=>
Applicative
(
StT
s
m
)
where
pure
=
return
...
...
Cabal/Distribution/ParseUtils.hs
View file @
4761562f
...
...
@@ -121,7 +121,7 @@ instance Functor ParseResult where
fmap
f
(
ParseOk
ws
x
)
=
ParseOk
ws
$
f
x
instance
Applicative
ParseResult
where
pure
=
ParseOk
[]
pure
=
return
(
<*>
)
=
ap
...
...
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