diff options
author | Brad Richardson <brichardson@structint.com> | 2020-03-24 15:52:03 -0500 |
---|---|---|
committer | Brad Richardson <brichardson@structint.com> | 2020-03-24 15:52:03 -0500 |
commit | ba15f97918a479fc7d96ae10b703e9e5cfe97b47 (patch) | |
tree | bd22c60b36978f75f0b45a623cf379b3201cfc8d /app | |
parent | 32ef5485eefe9540b60b4c6cf626e61eefe6e6fd (diff) | |
download | fpm-ba15f97918a479fc7d96ae10b703e9e5cfe97b47.tar.gz fpm-ba15f97918a479fc7d96ae10b703e9e5cfe97b47.zip |
Reformat Haskell
Diffstat (limited to 'app')
-rw-r--r-- | app/Main.hs | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/app/Main.hs b/app/Main.hs index 88bb302..5b1f864 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -26,47 +26,47 @@ data Command = Run | Test | Build main :: IO () main = do - args <- getArguments - app args + args <- getArguments + app args app :: Arguments -> IO () app args = case command' args of - Run -> putStrLn "Run" - Test -> putStrLn "Test" - Build -> build + Run -> putStrLn "Run" + Test -> putStrLn "Test" + Build -> build build :: IO () build = do - putStrLn "Building" - buildLibrary "src" - [".f90", ".f", ".F", ".F90", ".f95", ".f03"] - ("build" </> "library") - "gfortran" - ["-g", "-Wall", "-Wextra", "-Werror", "-pedantic"] - "library" - [] - buildPrograms "app" - ["build" </> "library"] - [".f90", ".f", ".F", ".F90", ".f95", ".f03"] - ("build" </> "app") - "gfortran" - ["-g", "-Wall", "-Wextra", "-Werror", "-pedantic"] + putStrLn "Building" + buildLibrary "src" + [".f90", ".f", ".F", ".F90", ".f95", ".f03"] + ("build" </> "library") + "gfortran" + ["-g", "-Wall", "-Wextra", "-Werror", "-pedantic"] + "library" + [] + buildPrograms "app" + ["build" </> "library"] + [".f90", ".f", ".F", ".F90", ".f95", ".f03"] + ("build" </> "app") + "gfortran" + ["-g", "-Wall", "-Wextra", "-Werror", "-pedantic"] getArguments :: IO Arguments getArguments = execParser - (info - (arguments <**> helper) - (fullDesc <> progDesc "Work with Fortran projects" <> header - "fpm - A Fortran package manager and build system" - ) + (info + (arguments <**> helper) + (fullDesc <> progDesc "Work with Fortran projects" <> header + "fpm - A Fortran package manager and build system" ) + ) arguments :: Parser Arguments arguments = subparser - ( command "run" (info runArguments (progDesc "Run the executable")) - <> command "test" (info testArguments (progDesc "Run the tests")) - <> command "build" (info buildArguments (progDesc "Build the executable")) - ) + ( command "run" (info runArguments (progDesc "Run the executable")) + <> command "test" (info testArguments (progDesc "Run the tests")) + <> command "build" (info buildArguments (progDesc "Build the executable")) + ) runArguments :: Parser Arguments runArguments = pure $ Arguments Run @@ -79,6 +79,6 @@ buildArguments = pure $ Arguments Build getDirectoriesFiles :: [FilePath] -> [FilePattern] -> IO [FilePath] getDirectoriesFiles dirs exts = getDirectoryFilesIO "" newPatterns - where - newPatterns = concatMap appendExts dirs - appendExts dir = map ((dir <//> "*") ++) exts + where + newPatterns = concatMap appendExts dirs + appendExts dir = map ((dir <//> "*") ++) exts |