Commit 64b16d79 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Add ShowAction typeclass.

parent 4166bc73
{-# 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment