diff options
| author | Daniel Gröber <dxld@darkboxed.org> | 2018-11-05 23:35:40 +0100 | 
|---|---|---|
| committer | Daniel Gröber <dxld@darkboxed.org> | 2019-01-22 03:03:25 +0100 | 
| commit | a456ca5fec522342981e65443193759355b77b3c (patch) | |
| tree | ca1cb68140212cc59acd4d134e5ff5e61a6a2cc4 /src/CabalHelper | |
| parent | f7fd1258eea146589e96188174c6ef1ad3a4f05b (diff) | |
Formatting/indent changes
[ci skip]
Diffstat (limited to 'src/CabalHelper')
| -rw-r--r-- | src/CabalHelper/Compiletime/Cabal.hs | 40 | 
1 files changed, 19 insertions, 21 deletions
| diff --git a/src/CabalHelper/Compiletime/Cabal.hs b/src/CabalHelper/Compiletime/Cabal.hs index 9e6fbeb..8f55473 100644 --- a/src/CabalHelper/Compiletime/Cabal.hs +++ b/src/CabalHelper/Compiletime/Cabal.hs @@ -38,34 +38,36 @@ import Paths_cabal_helper (version)  -- | Cabal library version we're compiling the helper exe against.  data CabalVersion -    = CabalHEAD  { cvCommitId   :: CommitId } +    = CabalHEAD { cvCommitId :: CommitId }      | CabalVersion { cabalVersion :: Version }  newtype CommitId = CommitId { unCommitId :: String }  showCabalVersion :: CabalVersion -> String  showCabalVersion (CabalHEAD commitid) = -    "HEAD-" ++ unCommitId commitid +  "HEAD-" ++ unCommitId commitid  showCabalVersion CabalVersion {cabalVersion} = -    showVersion cabalVersion +  showVersion cabalVersion  exeName :: CabalVersion -> String  exeName (CabalHEAD commitid) = intercalate "--" -    [ "cabal-helper-" ++ showVersion version -    , "Cabal-HEAD" ++ unCommitId commitid -    ] +  [ "cabal-helper-" ++ showVersion version +  , "Cabal-HEAD" ++ unCommitId commitid +  ]  exeName CabalVersion {cabalVersion} = intercalate "--" -    [ "cabal-helper-" ++ showVersion version -    , "Cabal-" ++ showVersion cabalVersion -    ] - -data CabalPatchDescription = CabalPatchDescription { -      cpdVersions      :: [Version], -      cpdUnpackVariant :: UnpackCabalVariant, -      cpdPatchFn       :: FilePath -> IO () -    } +  [ "cabal-helper-" ++ showVersion version +  , "Cabal-" ++ showVersion cabalVersion +  ] + +data CabalPatchDescription = CabalPatchDescription +  { cpdVersions      :: [Version] +  , cpdUnpackVariant :: UnpackCabalVariant +  , cpdPatchFn       :: FilePath -> IO () +  } +  nopCabalPatchDescription :: CabalPatchDescription -nopCabalPatchDescription = CabalPatchDescription [] LatestRevision (const (return ())) +nopCabalPatchDescription = +  CabalPatchDescription [] LatestRevision (const (return ()))  patchyCabalVersions :: [CabalPatchDescription]  patchyCabalVersions = [ @@ -119,11 +121,7 @@ patchyCabalVersions = [       renameFile versionFileTmp versionFile -unpackPatchedCabal -    :: Env -    => Version -    -> FilePath -    -> IO CabalSourceDir +unpackPatchedCabal :: Env => Version -> FilePath -> IO CabalSourceDir  unpackPatchedCabal cabalVer tmpdir = do      res@(CabalSourceDir dir) <- unpackCabal cabalVer tmpdir variant      patch dir | 
