HE3%      !"#$Extra exit utilities.(c) Henry J. Wylde, 2015BSD3public@hjwylde.comSafe47%>Panics, logging the error to stderr and exiting fast with 128.&cPanics, logging the error to stderr and exiting fast with 128. Rather than exiting fast using a ', this method uses ( (panic_ = runPanic . panic).)Runs the panic, calling ( if the * had an error thrown.%&)%&)%&)System process utilities.(c) Henry J. Wylde, 2015BSD3public@hjwylde.comNone47+ZRuns the given executable with the arguments. Returns the exit code, stdout and stderr.,Runs the given executable with the arguments. Depending on the exit code, either logs the stderr and exits fast (128) or returns the stdout.-DRuns the given command. Returns the exit code, stdout and stderr..yRuns the given command. Depending on the exit code, either logs the stderr and exits fast (128) or returns the stdout./Runs the given 0.. Returns the exit code, stdout and stderr.1Runs the given 0c. Depending on the exit code, either logs the stderr and exits fast (128) or returns the stdout.+,-./1+,-./1+,-./1Configuration data structures.(c) Henry J. Wylde, 2015BSD3public@hjwylde.comNoneA program has a semantic name, associated extensions and formatting command. The command string may contain variables, denoted by strings surrounded with '{{..}}'. The command should return a 0 exit code for success, or a non-0 exit code for failure..A semantic name (has no impact on formatting)..A list of extensions, without a period prefix.ZA command to run in a shell that prettifies an input file and writes to an output file.A collection of s.An empty config (no programs). ^Reads a config from the given file path if possible. If an error occurs it is logged using 2. LFinds the nearest config file by searching from the given directory upwards.ATODO (hjw): fix the bug where it won't search the root directory. %The file name of the default config, '.omnifmt.yaml'. Attempts to find a O for the given extension. Programs are searched in order as provided by the ) and the first match will be returned. fromJust . programFor=Checks if the given extension is supported (i.e., there is a  for it).?The empty program (no extensions and the command always fails).MSubstitutes the mapping throughout the command. The mapping is a tuple of (variable, value)Y. Values given are quoted and have any backslashes and double quotaiton marks escaped.1Checks whether the text uses the input variable ().2Checks whether the text uses the output variable ().%The input variable name, '{{input}}'.'The output variable name, '{{output}}'. 34   34Pipeline for formatting files.(c) Henry J. Wylde, 2015BSD3public@hjwylde.comNone47F7A status for a file going through the omnifmt pipeline. The file has not been processed.An error occurred somewhere.2The file type is unsupported (i.e., no applicable ).The file could not be found.The file is pretty.The file is ugly.The file is now pretty.OTakes an input (ugly) file path and an empty output file path and prepends the  status to them.Utility method for applying a function to files that match certain statuses. Any files that don't match the given statuses will be passed through unmodified. Checks all  files to see if they're .  Checks all & ugly file paths to see if they exist.!Runs the applicable Program's command on all S files. This reads in the ugly file path and writes out to the pretty file path.lNote that this function assumes that the file is supported, so make sure the file has been piped through  first.'Any errors that occur are logged using 2.",Runs a diff over the two file paths for all  files.2This function always updates the status to either ,  or .'Any errors that occur are logged using 2.#Commits the result of !. I.e., writes over all , files with their corresponding pretty file.$This function updates the status to .$!Logs the status of each file. ,  and  are logged using 2.  and  are logged using 5.  and  are logged using 6. !"#$ !"#$ !"#$  !"#$7       !"#$%&'()*+,-./0123456789:;<=>?@A=>B=>CDgitfm_DLrhw0QAdZqIwKcaFwNi6vOmnifmt.Config Omnifmt.Pipes Omnifmt.ExitOmnifmt.ProcessProgramname extensionscommandConfigprograms emptyConfig readConfignearestConfigFiledefaultFileName programForunsafeProgramFor supported emptyProgram substituteusesInputVariableusesOutputVariableinputVariableNameoutputVariableNameStatusUnknownError UnsupportedNotFoundPrettyUgly PrettifiedomnifmtselectcheckFileSupportedcheckFileExists runProgramcheckFilePrettycommit statusPrinterpanicpanic_mtl_KMpng31YRYc5JfMWFZ3FCUControl.Monad.Error.Class MonadErrorbase System.ExitexitWithrunPanictrans_3eG64VdP2vzGjP6wJiCp5XControl.Monad.Trans.ExceptExceptT runProcess runProcess_ runCommand runCommand_runCreateProcessproce_FLTz0SLwyG6LJUpZ52HjkUSystem.Process.Internals CreateProcessrunCreateProcess_monad_Bp9SZrRMbS3HSDDEIt9MorControl.Monad.Logger logDebugN$fFromJSONProgram$fFromJSONConfiglogInfoN logErrorN