Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
64b16d79
Commit
64b16d79
authored
Jan 01, 2015
by
Andrey Mokhov
Browse files
Add ShowAction typeclass.
parent
4166bc73
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Base.hs
View file @
64b16d79
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}
module
Base
(
module
Development
.
Shake
,
module
Development
.
Shake
.
FilePath
,
...
...
@@ -27,8 +29,14 @@ instance Monoid a => Monoid (Action a) where
mempty
=
return
mempty
mappend
p
q
=
mappend
<$>
p
<*>
q
arg
::
[
String
]
->
Args
arg
=
return
class
ShowAction
a
where
showAction
::
a
->
Action
String
instance
ShowAction
String
where
showAction
=
return
arg
::
ShowAction
a
=>
[
a
]
->
Args
arg
=
mapM
showAction
intercalateArgs
::
String
->
Args
->
Args
intercalateArgs
s
args
=
do
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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