diff options
author | Brad Richardson <brichardson@structint.com> | 2020-06-01 08:01:32 -0700 |
---|---|---|
committer | Brad Richardson <brichardson@structint.com> | 2020-06-01 08:01:32 -0700 |
commit | 3a4f1dbbb8f05c9f00807d06724490b232e56ac7 (patch) | |
tree | c71c58e6e3c88578e4fc7399326fe80cb7088d71 /src | |
parent | c4463d3a81b74cdfa39d0f4055c5d7993a29f889 (diff) | |
download | fpm-3a4f1dbbb8f05c9f00807d06724490b232e56ac7.tar.gz fpm-3a4f1dbbb8f05c9f00807d06724490b232e56ac7.zip |
Run auto-format
Diffstat (limited to 'src')
-rw-r--r-- | src/Fpm.hs | 79 |
1 files changed, 44 insertions, 35 deletions
@@ -198,7 +198,9 @@ build settings = do ((map snd executableDepends) ++ (map snd localDependencies)) ) executables - devDependencies <- fetchExecutableDependencies maybeTree (appSettingsDevDependencies settings) >>= buildDependencies buildPrefix compiler flags + devDependencies <- + fetchExecutableDependencies maybeTree (appSettingsDevDependencies settings) + >>= buildDependencies buildPrefix compiler flags mapM_ (\Executable { executableSourceDir = sourceDir, executableMainFile = mainFile, executableName = name, executableDependencies = dependencies } -> do @@ -207,14 +209,20 @@ build settings = do >>= buildDependencies buildPrefix compiler flags buildProgram sourceDir - ((map fst executableDepends) ++ (map fst devDependencies) ++ (map fst localDependencies)) + ( (map fst executableDepends) + ++ (map fst devDependencies) + ++ (map fst localDependencies) + ) [".f90", ".f", ".F", ".F90", ".f95", ".f03"] (buildPrefix </> sourceDir) compiler flags name mainFile - ((map snd executableDepends) ++ (map snd devDependencies) ++ (map snd localDependencies)) + ( (map snd executableDepends) + ++ (map snd devDependencies) + ++ (map snd localDependencies) + ) ) tests @@ -266,7 +274,8 @@ settingsCodec = .= tomlSettingsTests <*> Toml.tableMap Toml._KeyString versionCodec "dependencies" .= tomlSettingsDependencies - <*> Toml.tableMap Toml._KeyString versionCodec "dev-dependencies" .= tomlSettingsDevDependencies + <*> Toml.tableMap Toml._KeyString versionCodec "dev-dependencies" + .= tomlSettingsDevDependencies libraryCodec :: TomlCodec Library libraryCodec = Library <$> Toml.string "source-dir" .= librarySourceDir @@ -349,39 +358,39 @@ toml2AppSettings tomlSettings release = do projectName testSettings <- getTestSettings $ tomlSettingsTests tomlSettings buildPrefix <- makeBuildPrefix compiler release - let dependencies = tomlSettingsDependencies tomlSettings + let dependencies = tomlSettingsDependencies tomlSettings let devDependencies = tomlSettingsDevDependencies tomlSettings return AppSettings - { appSettingsCompiler = compiler - , appSettingsProjectName = projectName - , appSettingsBuildPrefix = buildPrefix - , appSettingsFlags = if release - then - [ "-Wall" - , "-Wextra" - , "-Wimplicit-interface" - , "-fPIC" - , "-fmax-errors=1" - , "-O3" - , "-march=native" - , "-ffast-math" - , "-funroll-loops" - ] - else - [ "-Wall" - , "-Wextra" - , "-Wimplicit-interface" - , "-fPIC" - , "-fmax-errors=1" - , "-g" - , "-fbounds-check" - , "-fcheck-array-temporaries" - , "-fbacktrace" - ] - , appSettingsLibrary = librarySettings - , appSettingsExecutables = executableSettings - , appSettingsTests = testSettings - , appSettingsDependencies = dependencies + { appSettingsCompiler = compiler + , appSettingsProjectName = projectName + , appSettingsBuildPrefix = buildPrefix + , appSettingsFlags = if release + then + [ "-Wall" + , "-Wextra" + , "-Wimplicit-interface" + , "-fPIC" + , "-fmax-errors=1" + , "-O3" + , "-march=native" + , "-ffast-math" + , "-funroll-loops" + ] + else + [ "-Wall" + , "-Wextra" + , "-Wimplicit-interface" + , "-fPIC" + , "-fmax-errors=1" + , "-g" + , "-fbounds-check" + , "-fcheck-array-temporaries" + , "-fbacktrace" + ] + , appSettingsLibrary = librarySettings + , appSettingsExecutables = executableSettings + , appSettingsTests = testSettings + , appSettingsDependencies = dependencies , appSettingsDevDependencies = devDependencies } |