{-# LANGUAGE FlexibleInstances, TypeSynonymInstances, TypeOperators #-}-- | This module provides versions of the 'Development.Shake.Derived.system'' family of functions-- which take a variable number of arguments.---- All these functions take a variable number of arguments.---- * @String@ arguments are treated as whitespace separated arguments.---- * @[String]@ arguments are treated as literal arguments.---- As an example, to run @ghc --make -O2 inputs -o output@:---- @-- 'sys' \"ghc --make -O2\" inputs \"-o\" [output]-- @---- Note that we enclose @output@ as a list so that if the output name contains spaces they are-- appropriately escaped.moduleDevelopment.Shake.Sys(sys,sysCwd,sysOutput,args)whereimportDevelopment.Shake.CoreimportDevelopment.Shake.Derivedtypea:->t=a-- | A variable arity version of 'system''.sys::SysArgumentsv=>String->v:->Action()sysx=sys_[]xclassSysArgumentstwheresys_::[String]->tinstance(Arga,SysArgumentsr)=>SysArguments(a->r)wheresys_xsx=sys_$xs++argxinstanceSysArguments(Action())wheresys_(x:xs)=system'xxssys_[]=error"No executable or arguments given to sys"-- | A variable arity version of 'systemCwd'.sysCwd::SysCwdArgumentsv=>FilePath->String->v:->Action()sysCwddirx=sysCwd_dir[]xclassSysCwdArgumentstwheresysCwd_::FilePath->[String]->tinstance(Arga,SysCwdArgumentsr)=>SysCwdArguments(a->r)wheresysCwd_dirxsx=sysCwd_dir$xs++argxinstanceSysCwdArguments(Action())wheresysCwd_dir(x:xs)=systemCwddirxxssysCwd_dir[]=error"No executable or arguments given to sysCwd"-- | A variable arity version of 'systemOutput'.sysOutput::SysOutputArgumentsv=>String->v:->Action(String,String)sysOutputx=sysOutput_[]xclassSysOutputArgumentstwheresysOutput_::[String]->tinstance(Arga,SysOutputArgumentsr)=>SysOutputArguments(a->r)wheresysOutput_xsx=sysOutput_$xs++argxinstanceSysOutputArguments(Action(String,String))wheresysOutput_(x:xs)=systemOutputxxssysOutput_[]=error"No executable or arguments given to sys"-- | A variable arity function to accumulate a list of arguments.args::ArgsArgumentsv=>v:->[String]args=args_[]classArgsArgumentstwhereargs_::[String]->tinstance(Arga,ArgsArgumentsr)=>ArgsArguments(a->r)whereargs_xsx=args_$xs++argxinstanceArgsArguments[String]whereargs_=idclassArgawherearg::a->[String]instanceArgStringwherearg=wordsinstanceArg[String]wherearg=id